summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine
AgeCommit message (Collapse)Author
2012-07-05skin_engine: Allow the %St() (setting) skin tag be used as a barJonathan Gordon
%St(<setting name>) or %St(<bar tags>, setting, <setting name>) Change-Id: I71396d683634d4d1ad2357018c4029ecb4229677
2012-07-05fix build warningsJonathan Gordon
Change-Id: Id5f0e84834f1cb74a317bb5653fdb6f665233345
2012-07-05skin_engine: Automatically create touch regions for skin barsJonathan Gordon
skin bars now automatically create the touch region the same size as the bar on touchscreen targets. This means touches will magically "just work" for reveresed bars (rtl or otherwise). ~5% padding is added on all 4 sides of the region rectangle but this may need to be tweaked. Please consider the 'progressbar' and 'volume' touchregion actions to be deprecated. Kudos to my new wife for figuring out the bleedingly obvious way to do this! Change-Id: I997a7bcaa70fce9885808aae27953c7676e9c2ff
2012-06-19CHARCELL doesn't have sbs support, so disable it properly.Frank Gevaerts
This actually fixes a nullpointer dereference. Change-Id: Ie3e153d72bcacdce46bfe5a514ff77aebdfd7225
2012-06-10Fix checks on buflib allocated handles (0 is not a valid handle value)Bertrik Sikken
Change-Id: I8fdc5a59a5062f40a431cd49971390e21631b8ec
2012-05-30Fix FS#12674 - %ax() doesnt mirror viewport correctlyJonathan Gordon
Change-Id: I10c933542037eeedc9c4be74b3d43a1430ec05b2
2012-05-16(hopefully) Fix FS#12639 and other skin related buflib corruption issues.Jonathan Gordon
Kudos to funman for figuring out the problem - skin_find_item() rather stupidly uses the global skin_buffer variable in skin_parser.c which is fine in the parser EXCEPT it gets changed in skin_render when the sbs is being redrawn while another skin is loading, so fix this by makeing skin_find_item() use a local data pointer so a skin_render() during parsing won't break anything. Change-Id: I80e1c0efe569c18225e5772159c18ebb21e07332
2012-05-09Rename HAVE_PITCHSCREEN to HAVE_PITCHCONTROLNils Wallménius
Also move the definition to config.h Change-Id: I36bb5020c5e06b2344292bc05e8c13ccc7a6a1ff Reviewed-on: http://gerrit.rockbox.org/234 Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-05-06get_image_filename() return value is never usedRafaël Carré
2012-05-06skin_parser: simplify skin_buffer_allocRafaël Carré
- no need to cast void * return value (it is not C++) - use sizeof(*var) instead of sizeof(struct foobar), it is shorter and will stay correct if the type is changed but forgotten in the sizeof()
2012-05-02Use buflib for the allocation of voice PCM resources.Michael Sevakis
Buffers are not allocated and thread is not created until the first call where voice is required. Adds a different callback (sync_callback) to buflib so that other sorts of synchonization are possible, such as briefly locking-out the PCM callback for a buffer move. It's sort of a messy addition but it is needed so voice decoding won't have to be stopped when its buffer is moved. Change-Id: I4d4d8c35eed5dd15fb7ee7df9323af3d036e92b3
2012-04-30Make DSP's replaygain independent of global_settings.Michael Sevakis
Moves replaygain definitions to lib/rbcodec/dsp/dsp_misc.h. Intermediate functions in misc.c handle any adjustment and calling the rbcodec APIs. Change-Id: I9f03561bca9aedd13760cf19c4e19aa3c68e7024 Reviewed-on: http://gerrit.rockbox.org/140 Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
2012-04-29Make rbcodec/dsp includes more specific.Michael Sevakis
Change-Id: Idb6af40df26f5b8499a40e8b98602261ef227044
2012-03-27skin_engine: Allow negative numbers for the start offset in %ssJonathan Gordon
i.e %ss(-1, -, %ia) will get the last letter in the %ia tag Change-Id: I6b2764d30c072b549e7424fc6e847ec48850b46a
2012-03-26skin_engine: fix scrolling lines with dynamic contentJonathan Gordon
Change-Id: If85220c8b59123814e0e6b1a3b8e00c981271021
2012-03-20Fix FS#12606 - next track can cause the screen to be clearedJonathan Gordon
This is a bit of a hack. We now trigger an event when the skin engine is doing a full redraw (which means fullscreen clear) before the lcd_update() to give the current screen a chance to redraw to avoid the screen flicker. This commit fixes the issue for screens which are entirely the list widget (i.e browser and menus), other screens will need aditional fixes (i.e quickscreen, time&date screen) Change-Id: I3725c51518be724ce7aacee9877663c2de6866fa
2012-03-15skin_engine: Reenable skin debugging in the sim (use --debugwps)Jonathan Gordon
Change-Id: I2881edda45cd3ea69f5284d93bc93c47bb63b3f2
2012-03-15Fix compile errorsJonathan Gordon
Change-Id: Ic985bf57da04847bff716ee41db8f107100ff95b
2012-03-15skin_engine: New tag to draw a rectangle (optionally with a gradient)Jonathan Gordon
%dr(x, y, width, height, [colour1[, colour2]]): x,y - viewport relative pixel coordinates to start the rectangle. width, height - obvious. can be '-' to fill the viewport if both colours are left out the viewports foreground colour will be used if one colour is specified it will fill the rectangle that colour. if both colours are specified it will gradient fill the rectangle. Change-Id: Iad451e99ded663bc7c5d182443659db7d909b388
2012-03-15Revert "Fix FS#12606 - next track can cause the screen to be cleared"Jonathan Gordon
This reverts commit cb9bc3bbc8a66c3d5296bfbc68f4487c39c6ac68.
2012-03-14Fix FS#12606 - next track can cause the screen to be clearedJonathan Gordon
This is a bit of a hack. We now trigger an event when the skin engine is doing a full redraw (which means fullscreen clear) before the lcd_update() to give the current screen a chance to redraw to avoid the screen flicker. This commit fixes the issue for screens which are entirely the list widget (i.e browser and menus), other screens will need aditional fixes (i.e quickscreen, time&date screen) Change-Id: I3ffdcd8ccad2c663732f8d5983049c837de00fe5
2012-03-13Add new actions to %Tp (Touchscreen areas)Osborne Jacobs
Add the following actions to %Tp: createbookmark create a new bookmark from the wps listbookmarks list bookmarks from the wps trackinfo show track info from the wps My main motivation was to allow bookmarking and jumping around audio books from the wps on touch enabled targets. You can do it now through the context menu but it requires 4 screen presses instead of 1. Change-Id: I1fa1bf0064dfd22b897eca7c56acc1ce8956f14c Reviewed-on: http://gerrit.rockbox.org/171 Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-02-29Call skinlist_set_cfg() unconditionally, i.e. also if do_refresh==falseFrank Gevaerts
This call is cheap (except if the list config changes, but then it should be called anyway), and do_refresh isn't always set appropriately, e.g. when the screen has just changed, which could cause the list config to be null at bad times, which caused the standard list to be shown instead of the desired skinned list. Change-Id: I47dd2552d6d1062456ede4529c4891e80a8159ea Reviewed-on: http://gerrit.rockbox.org/113 Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
2012-02-29fix warningJonathan Gordon
Change-Id: Iccadc7558b9ffb2d87e5bc7697080dd567f4775f
2012-02-29skin_engine: ease the restrictions on %x/%xlJonathan Gordon
%x and %xl only require the id and filename now. If you leave off the x,y it will default to 0,0. If you want to use the default x,y you can still put in the num_subimages param on the end (e.g %xl(a, file, 3) ) Change-Id: I8eff793dfdd037e302ace8deec9dc16dcea264a7
2012-02-28skin_engine: Clean up %x() handling - beware theme issuesJonathan Gordon
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
2012-02-28Fix build errorsJonathan Gordon
Change-Id: Ie46e807799034af2a025c607a76e17c50c5b613e
2012-02-28lcd/skin_engine: Add the ability to draw onto the backdrop layerJonathan Gordon
The framebuffer the lcd driver uses can now be changed on the fly which means that regular lcd_* drawing functions can draw onto the "backdrop" buffer. The skin engine can use this to create layered effects. Add the tag %VB to a viewport to draw that viewport onto the backdrop layer. If you want to draw an image onto the backdrop framebuffer use %x(backdrop filename) instead of %X() inside a viewport with %VB. Change-Id: I741498e2af6d4f2d78932cabe8942317893e7cfc
2012-02-25Add %LR and %LC to get at the current row and columm in skinned lists.Frank Gevaerts
This allows list items to be rendered differently depending on their on-screen position, allowing things like gradients or nonlinear alignment Change-Id: I1d9c080f97e83707f0e80f57abc762cb2b94f6ed
2012-02-26FS#12586 - Modify %ss to be able to use numbers for conditionalsJonathan Gordon
i.e %?ss(1,1,%cM)<|one|two|three|...|> or %xd(numbers, %ss(1,1%cM) Change-Id: I74ecb3f253f3be1fd270f75c0ef79addd364a7de
2012-02-22Store listitem_viewport_cfg->label as skinoffset instead of raw pointerFrank Gevaerts
This fixes the case where some blocks got relocated and the skin render code couldn't find the matching viewports any more. Change-Id: I4394444fb139ee5bc986f374dba82a104013e354 Reviewed-on: http://gerrit.rockbox.org/112 Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
2012-02-21skin engine: Add 'touch' command to the %vs() tagJonathan Gordon
%vs(label, touch, -) will reset the timeout for the variable without changing the variables value. Change-Id: Idba03f454a82ac7460bb53a4de3aa6903656c585
2012-02-21skin engine: Make %vs() dynamic so it updated every screen updateJonathan Gordon
This makes it easier to use %?vl() (variable last changed) in a sensible manner. Change-Id: I0bf9ae24bc4516d2fd5691af236cc4439a0863c8
2012-02-07skin engine: New logical 'and' and 'or' tags to evaluate multiple tags in a ↵Jonathan Gordon
single conditional. Use these tags to stop having multiple conditionals.. e.g: OLD: %?C<%?Ia<something>> NEW: %?and(%C, %Ia)<something> Change-Id: Ia3bbe4611cf808e87dcd1b1147181461fa08294a
2012-01-28skin touchregions: change the rwd/ffwd region actions to make it less buggy ↵Jonathan Gordon
in the sbs Change-Id: Ib823860e65909ac227910a16f6caac207b7e22c3
2012-01-23skin touchregions: fix the 'none' region firing when it shouldnt.Jonathan Gordon
Change the none action return value so the various action layers don't get confused by ACTION_TOUCHSCREEN return codes which shouldn't be happening (i.e when a long press region overlaps a short press region whihc has the none action) Change-Id: I63db2c0b49597ada2c5ebd0ef98e99aeef4f522a
2012-01-03Rework powermgmt to enable code re-use on appliation and sims.Thomas Martitz
* Introduce CONFIG_BATTERY_MEASURE define, to allow targets (application) to break powermgmt.c's assumption about the ability to read battery voltage. There's now additionally percentage (android) and remaining time measure (maemo). No measure at all also works (sdl app). If voltage can't be measured, then battery_level() is king and it'll be used for power_history and runtime estimation. * Implement target's API in the simulator, i.e. _battery_voltage(), so it doesn't need to implement it's own powermgmt.c and other stubs. Now the sim behaves much more like a native target, although it still changes the simulated battery voltage quickly, * Other changes include include renaming battery_adc_voltage() to _battery_voltage(), for consistency with the new target functions and making some of the apps code aware that voltage and runtime estimation is not always available. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31548 a1c6a512-1295-4272-9138-f99709370657
2011-12-20Another round of making local functions staticBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31384 a1c6a512-1295-4272-9138-f99709370657
2011-12-14FS#12378 : Remove various unused code, and comment out some unused code and ↵Boris Gjenero
data for reference or future use. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657
2011-12-14Allow scrolling lines to have their content changed without restarting the ↵Jonathan Gordon
scroll line. This means skin lines with dynamic tags can be updated in realtime instead of delayed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31247 a1c6a512-1295-4272-9138-f99709370657
2011-12-14Fix FS#12237 (caused by r30302) where centered skin text isnt eqactly centeredJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31246 a1c6a512-1295-4272-9138-f99709370657
2011-11-29FS#12412 : Delete old buffer allocation code which has been replaced by ↵Boris Gjenero
core_alloc, and move buffer setup code to core_alloc.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31088 a1c6a512-1295-4272-9138-f99709370657
2011-11-28Fix fs#12005 - have %pc,%pl and %pr return the number of seconds when used ↵Jonathan Gordon
with %if() instead of a formatted time string git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31082 a1c6a512-1295-4272-9138-f99709370657
2011-11-28Be less smart about when to reload skins as it caused more problems than it ↵Jonathan Gordon
was worth. If any theme setting is loading from a .cfg reload all skins. Fixes FS#12410 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31081 a1c6a512-1295-4272-9138-f99709370657
2011-11-28Fix FS#12408 - don't load skins too early causing buflib handles to leakJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31080 a1c6a512-1295-4272-9138-f99709370657
2011-11-27slightly reaarange code to make fml happy :)Jonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31071 a1c6a512-1295-4272-9138-f99709370657
2011-11-27Free a handle when we try to load a backdrop file which doesnt exist or cant ↵Jonathan Gordon
be loaded git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31070 a1c6a512-1295-4272-9138-f99709370657
2011-11-21Fix the charcell compile error and rmeove an unused #defineJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31039 a1c6a512-1295-4272-9138-f99709370657
2011-11-21skinengine: Load the fms the first time the fm screen is entered instead of ↵Jonathan Gordon
on boot to save some ram git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31038 a1c6a512-1295-4272-9138-f99709370657
2011-11-21skinengine: Rework skin loading so skins can be un/loaded individually. This ↵Jonathan Gordon
also means that loading a .cfg which doesnt change themes shouldnt have them reloaded git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31037 a1c6a512-1295-4272-9138-f99709370657