summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine (follow)
Commit message (Collapse)AuthorAge
* Improve radio RDS driver and frameworkMichael Sevakis2017-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove unused bits like the radio event and simplify basic radio interface. It can be more self-contained with rds.h only required by radio and tuner code. * Add post-processing to text a-la Silicon Labs AN243. The chip's error correction can only do so much; additional checks are highly recommended. Simply testing for two identical messages in a row is extremely effective and I've never seen corrupted text since doing that, even with mediocre reception. Groups segments must arrive in order, not randomly; logic change only accepts them in order, starting at 0. Time readout was made a bit better but really we'd need to use verbose mode and ensure that no errors were seen during receiving of time and more checks would be need to have a stable PI. The text is the important bit anyway. * Time out of stale text. * Text is no longer updated until a complete group has been received, as is specified in the standard. Perhaps go back to scrolling text lines in the radio screen? * Add proper character conversion to UTF-8. Only the default G0 table for the moment. The other two could be added in. * Add variants "RDS_CFG_PROCESS" and "RDS_CFG_PUSH" to allow the option for processed RDS data to be pushed to the driver and still do proper post-processing (only text conversion for now for the latter). Change-Id: I4d83f8b2e89a209a5096d15ec266477318c66925
* Fix dangerous castsAmaury Pouly2017-02-04
| | | | | | | | | On Windows 64-bit, the size of long is 32-bit, thus any pointer to long cast is not valid. In any case, one should use intptr_t and ptrdiff_t when casting to integers. This commit attempts to fix all instances reported by GCC. When relevant, I replaced code by the macros PTR_ADD, ALIGN_UP from system.h Change-Id: I2273b0e8465d3c4689824717ed5afa5ed238a2dc
* Fix misleading indentation as pointed out by the new gcc warningFrank Gevaerts2016-08-12
| | | | Change-Id: Ia9c0b09ffb57dccbc7d13fce3b3a8a7d46b84857
* Clarify usb_powered() and fix some code.Amaury Pouly2015-01-08
| | | | | | | | | | Either by mistake or because its meaning changed, usb_powered() doesn't mean what the name suggest, so clarify its meaning by renaming it to usb_powered_only. So use of usb_powered() are replaced by usb_inserted() when it makes more sense. Change-Id: I112887e2d8560e84587bee5f55c826dde8c806d8 Reviewed-on: http://gerrit.rockbox.org/1097 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* Fix broken buflib_handle check in backdrop settings loaderThomas Jarosch2014-12-20
| | | | | | | | | | | | The logic was messed up and always evaluated to true if buflib_handle is non-zero. Thanks to JdGordon for verifying the change. cppcheck reported: [rockbox/apps/gui/skin_engine/skin_backdrops.c:262]: (warning) Comparison of a boolean expression with an integer other than 0 or 1. Change-Id: Ib52a73e0a6a2017a631e2dec19b638a2974dab83
* Correct some file permissions.Szymon Dziok2014-09-08
| | | | Change-Id: I4a092a19d6a9c66dfeb2777c9655aa4b19d11e16
* add supports for x,y value in percentage to several tags.Chiwen Chang2014-07-21
| | | | | | | | | including BAR_PARAMS, %xl, %dr, %T,%St, %xl and %Cl Change-Id: I0811ebfff5f83085481dcbf08f97b7223f677bfe Reviewed-on: http://gerrit.rockbox.org/900 Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
* skin_engine: kill scrolling if the buffer movesJonathan Gordon2014-06-29
| | | | | | | | | | | | I have a suspicion that if there is any scrolling skin lines when the buflib buffer moves it will cause the lcd code to crash. This *hopefully* explains the random skin related crashed which have been reported. Change-Id: I04ee58292e1cea7c77ef9737b0641192f4f7e4ba Reviewed-on: http://gerrit.rockbox.org/877 Reviewed-by: Thomas Martitz <kugel@rockbox.org>
* lcd-24bit: Introduce a 24-bit mid-level LCD driverThomas Martitz2014-06-21
| | | | | | | | | | | | | | | | | With LCD driver all calculation will be performed on RGB888 and the hardware/OS can display from our 24bit framebuffer. It is not yet as performance optimized as the existing drivers but should be good enough.The vast number of small changes is due to the fact that fb_data can be a struct type now, while most of the code expected a scalar type. lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit it enforces the generic C code. All plugins are ported over. Except for rockpaint. It uses so much memory that it wouldnt fit into the 512k plugin buffer anymore (patches welcome). Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
* fix indenting, editor went nutsJonathan Gordon2014-06-02
| | | | Change-Id: Ibe363e5c75260f50c6c6c6fc58a2758a7902ffc3
* skin_engine: Don't double free buflib handles shared by skin imagesJonathan Gordon2014-06-02
| | | | Change-Id: I4158fb7dae664a746141f458c08bdcb84e148041
* Also make sure progressbars don't tihnk their images are loadedJonathan Gordon2014-05-18
| | | | Change-Id: I83bb8e246e4858396ca0b5d0d90fbd2d08a88c1e
* fix skin buffer crashes, img's are not loaded initialyJonathan Gordon2014-05-18
| | | | Change-Id: I32b5d5e446f5ae9340be2bd47841b06a5dbabeec
* don't load the same bmp image more than once in a skinJonathan Gordon2014-05-14
| | | | Change-Id: Ie38146a80bb356f40810f017c262b81edac69688
* skin_engine: Make %Vs affect the whole line.Thomas Martitz2014-04-18
| | | | | | | | | | 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
* ab_repeat: Move GUI bits to the skin engine. This allows ab_repeat to be ↵Thomas Martitz2014-03-10
| | | | | | compiled headless. Change-Id: I4fa3b8ef7139313891ca70df11f7f17c5df38cb7
* Implement time-based resume and playback start.Michael Sevakis2014-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This complements offset-based resume and playback start funcionality. The implementation is global on both HWCODEC and SWCODEC. Basically, if either the specified elapsed or offset are non-zero, it indicates a mid-track resume. To resume by time only, set elapsed to nonzero and offset to zero. To resume by offset only, set offset to nonzero and elapsed to zero. Which one the codec uses and which has priority is up to the codec; however, using an elapsed time covers more cases: * Codecs not able to use an offset such as VGM or other atomic formats * Starting playback at a nonzero elapsed time from a source that contains no offset, such as a cuesheet The change re-versions pretty much everything from tagcache to nvram. Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38 Reviewed-on: http://gerrit.rockbox.org/516 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
* Fix red on monochrome.Thomas Martitz2014-01-22
| | | | Change-Id: Ice40c81d0d07f7ec2014697e4de446dcb956afe8
* skin_engine/backdrops: Have to reload default backdrops from setting when it ↵Thomas Martitz2014-01-22
| | | | | | | | | | | | | | changed. When skins use the default backdrop (via %X(-) or no %X at all) and the setting changes it needs to be reloaded, otherwise when changing themes the new theme could show the backdrop from the previous theme. The same needs to be done when re-selecting the same theme after USB because the backdrop file was potentially overwritten. Fixes FS#12892 and FS#12942. Change-Id: Ic2d20740cc385fa99667ce8a71507dbda2efceaf
* skin_engine: Stricter checking for x, y, width, height for bar tags.Thomas Martitz2014-01-12
| | | | | | | Every theme that doesn't parse anymore now has broken values. I hope it's not too many of them. Change-Id: I6f52e55dc9197d0919f854240723a88f99c0b7da
* skin_engine: New param "noborder" for the bar tags.Thomas Martitz2014-01-12
| | | | | | | | | | 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
* touchscreen/skin_engine: The touchregion handler didn't handle that vertical ↵Thomas Martitz2014-01-12
| | | | | | bars are bottom-up by default Change-Id: I4e7fc451c7ba318acb110c587bff4306c393e09f
* skin engine: Fix FS#12884.Thomas Martitz2014-01-10
| | | | | | | | | The %Vf and %Vb tags change the colors for the rest of the viewport. This requires the rest of the vp to be redrawn when they change due to a conditional. The previous code did this redraw in all cases (conditional or not) which led to visible blinking. Change-Id: Ie59dfc6fe8ed76485a2a2bd7caf1315f1944c227
* skin_engine: Pass string to put_line() via $t because they can be very large.Thomas Martitz2014-01-09
| | | | Change-Id: I02d6bf492bb42e173a7b436427e3cc3560d80183
* Oops, pasted to the wrong place.Thomas Martitz2014-01-07
| | | | Change-Id: Icb07ddd04171699e997eca171bf8756b5fd9f024
* Fix a few reds and yellows.Thomas Martitz2014-01-07
| | | | Change-Id: I9ad2aca494f2ea3ca5453082ec5491ec031f9ae5
* lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport.Thomas Martitz2014-01-07
| | | | | | | These where used for line styling during scrolling, which is now done in apps/, The viewport struct doesn't need to record these anymore. Change-Id: I810d9dcb2644b00a798c6e75acab69c74a78e77f
* skin_engine: Adapt put_line().Thomas Martitz2014-01-07
| | | | | | This allows for code unification and removal of a workaround (STYLE_XY_PIXELS). Change-Id: Ie92d377414cad943cdb06976af10b4f315f32710
* Fix build errorJonathan Gordon2013-12-30
| | | | Change-Id: I32e06cc41c70e225622c87539feaca5f92131065
* skin_engine: unload skin backdrops when the skins are resetJonathan Gordon2013-12-29
| | | | | | | Hopefully this will fix various skin related bugs which happen on usb plug/unplug! Change-Id: Ie1d8378fca38dae02e42ed02a68bdb3663651b4d
* fix some reds.Thomas Martitz2013-12-23
| | | | Change-Id: Iecb1305dbd1519434e0f476d2199e728b96091f9
* playback,talk: Share audiobuffer via core_alloc_maximum().Thomas Martitz2013-12-23
| | | | | | | | | | | | | | | | This fixes the radioart crash that was the result of buffering.c working on a freed buffer at the same time as buflib (radioart uses buffering.c for the images). With this change the buffer is owned by buflib exclusively so this cannot happen. As a result, audio_get_buffer() doesn't exist anymore. Callers should call core_alloc_maximum() directly. This buffer needs to be protected as usual against movement if necessary (previously it was not protected at all which cased the radioart crash), To get most of it they can adjust the willingness of the talk engine to give its buffer away (at the expense of disabling voice interface) with the new talk_buffer_set_policy() function. Change-Id: I52123012208d04967876a304451d634e2bef3a33
* scroll_engine: Major rework to support pixel-based scrolling and scroll ↵Thomas Martitz2013-12-14
| | | | | | | | | | | | | | | | | | | callbacks. Much of the scrolling work is moved from lcd-bitmap-common to lcd-scroll.c, a small scroll callback routine remains. This callback can potentially be overridden by more extensive scrollers. The callback also gets fed with pixel-based scrolling information, which finally removes the strict line-based nature of the scroll engine. Along with this is the change from scroll_stop_viewport_line() to scroll_stop_viewport_rect() which works on a pixel-based rectangle instead of lines. The ultimate goal is to move most of the scroll work to apps, which can much better decide which line decorations to apply etc. This work is laying the ground work. Change-Id: I3b2885cf7d8696ddd9253d5a9a73318d3d42831a
* scroll_engine: Rename scroll_stop* functions to be more consistent with the ↵Thomas Martitz2013-12-14
| | | | | | lcd api. Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
* skin_engine: Fix crash on skin_reset (e.g. on language change).Thomas Martitz2013-06-23
| | | | Change-Id: Ie2da1a1ba9d2dad76e2f1c45abd907c3ede4f56c
* Fix warning (move variable into #ifdef section).Thomas Martitz2013-06-09
| | | | Change-Id: Ic6ba4b786eef00eab7f20abd5fbf2bcb8977993a
* Fix reds (this code needs #ifdef HAVE_ALBUMART)Thomas Martitz2013-06-09
| | | | Change-Id: Ia50cd846d5451b0cb5cf3a6f8097ea9fe3b3c60a
* skin_engine: Fix albumart logic on skin reloading.Thomas Martitz2013-06-09
| | | | | | | | | | | This logic checks whether the skin's albumart dimensions differ from the previous skin to force rebuffering if necessary. This was broken since a while as the necessary information was reset. Change-Id: I3b9f3a819c6af202af8ad66c13742f704ce45ab1 Reviewed-on: http://gerrit.rockbox.org/476 Tested-by: Thomas Martitz <kugel@rockbox.org> Reviewed-by: Thomas Martitz <kugel@rockbox.org>
* Revert "skin tags: fix the id3 track/disc numbers in conditionals"Jonathan Gordon2013-02-28
| | | | | This reverts commit a395a346719908e7d02ab7a742eb2b938dcc893d. And fixes FS#12836 - need to rethink how to do this later.
* checkwps: show a helpful error if the parser callback errors outJonathan Gordon2013-02-26
| | | | Change-Id: Ie3e35292ba8d74f0ff3d1bb3483a5e83aae0e6b6
* skin engine: Relax the AA load width/height checksJonathan Gordon2013-02-26
| | | | | | | | d6c6c07 changed the AA load tag to make sure the image width/heights fit in the viewport, Revert this because it doesn't actually make sense to check it here. Change-Id: I3fe4b074ef8fe88560f2f894ec651027ea3642f4
* skin tags: fix the id3 track/disc numbers in conditionalsJonathan Gordon2013-02-21
| | | | | | Fix the %in tag so %xd(a, %in) works as expected Change-Id: I33dd3ae092a66b1363c9cf3afa08075e4534af7c
* Theme Engine: Fix progress bar slider (FS#12823)Alex Mayer2013-02-19
| | | | | | | | | | | | | | | | | | | | 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>
* skin_engine: Add a debug screen to display skin ram usageJonathan Gordon2013-02-12
| | | | Change-Id: Ida9c33211d9360ac88e30a2cf8df9f191bee8b45
* Fix (c) notice which was apparently copy/pasted from a completly unrelated fileJonathan Gordon2013-02-12
| | | | Change-Id: I465bd6a70e911c7a56213af82b4db64c25c294f7
* remove unused membersJonathan Gordon2013-02-11
| | | | Change-Id: Ic0a0d300c9b7701c9173121d9d36a4dd4a28d8bd
* album art display: Fix RTL handling for the album art skin tagJonathan Gordon2013-01-15
| | | | | | | | | AA was broken when an RTL language is used, causing it to not be displayed. Also fix th out of bounds handling when width/height > viewport Change-Id: I4899cd32ec58107c987e3cc0e8df582963bdcf62
* radio screen: Disable displaying radio art, FS#12797Jonathan Gordon2013-01-03
| | | | | | | | | With radioart enabled there appears to be buffer corruption when the image is loaded causing the player to data abort in skin_render_line() So, disable the code untill someone can fix it. Change-Id: I6acf3f76ce38aa2784b1b24ed6da29a9c5bee479
* 9 segment bitmap drawing:Jonathan Gordon2012-12-09
| | | | | | | | | | 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
* Fix skin engine error messageJonathan Gordon2012-08-06
| | | | Change-Id: I2250be6d4e82cd5d91ed1a2c080e263dd7543129