summaryrefslogtreecommitdiff
path: root/firmware/export/lcd.h (follow)
Commit message (Collapse)AuthorAge
* 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
* Touchscreen: Show a line separator in lists.Thomas Martitz2014-03-03
| | | | | | | | | | | | This patch adds a configurable line separator between list items, very similar to lists in Android. Additionally, below the list item there is a thicker line. It can be disabled in the settings. Its color can be configured as well. Remote and monochrome displays are explicitly unsupported. If there is desire this can be changed but it doesn't seem useful to me. Change-Id: I005313b0d8f5ecd15864bf20e66ea4e3390d8b7d
* Implement lcd_get_dpi() for all bitmap targets.Thomas Martitz2014-03-03
| | | | | | | DPI values are autogenerated from the resolution and collected display size values. These values are inserted as comments as well. Change-Id: Id03aedf9af18348f773dfce002805e480f6751e8
* put_line/scrolling: Make the scroll engine inform custom scrollers about ↵Thomas Martitz2014-01-12
| | | | | | | | | | | | | | | | | | | | | start/stop of scrolling. With the new lcd_putsxy_scroll_func() code can register custom scroll functions (put_line() makes use of that). In order for the custom scroller to be able to properly manage its userdata pointer (set via struct scrollinfo::userdata) the scroll engine must inform the scroller about start and stop of scrolling. To inform about start the lcd_scroll_* functions now return true when the line will scroll. To inform about stop the scroll engine calls into the scroller one last time, with the text set to NULL. put_line() can use this to release the userdata registered per scrolling line so that it can be recycled. This fixes that some scrolling lines became glitchy after some time because the userdata was recycled too early. Change-Id: Iff0a6ce2a4f9ae2bada1b8e62f4f5950224942a9
* Fix Player red and icons on mono displays.Thomas Martitz2014-01-07
| | | | Change-Id: Ib8adcb4c70f2dd3ddd25da8f0606f48926dfd89e
* lcd/grey: Enable viewport fg_pattern and bg_pattern for all bitmap targets.Thomas Martitz2014-01-07
| | | | | | | | | Greylib performed a horrible hack and stored fg and bg patterns in other struct viewport fields. One of them was just removed. So instead of this hack simply enable the *_pattern fields for mono targets as well, so that greylib can use them normally. Change-Id: Ib0842ebcc97f5bf9d9382b4471903afa2f96f39f
* 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
* lcd-common: Remove direct style (line decorations) from lcd-puts* functions.Thomas Martitz2014-01-07
| | | | | | | | | | This logic is moved into apps (put_line()) which can better handle line decorations with respect to scrolling, mulitline and other complications. Firmware doesn't need this. The remaining drawing function know only one style, that is foreground on background/backdrop (changing drawmode is still supported). Change-Id: I707060edc388a7d723a7d09b0cf5cbda6ec56708
* lcd-common: Remove support for custom line heights from viewport.Thomas Martitz2014-01-07
| | | | | | | | Since scrolling is now pixel-based this is not necessary anymore. custom line height is handled by put_line() but can also possible to implement with lcd_puts_scroll_func(). Change-Id: Iee9b12bf99afac93d95d2a1a6f5d5b4db237b21c
* lcd-common/scroll_engine: Remove unused functions lcd_puts_style_xyoffset() ↵Thomas Martitz2014-01-07
| | | | | | | | | | | | | and lcd_puts_scroll_style_xyoffset(). With this functions removed there is no exported function in firmware left that draws line decorations. Also no function supports specifying an y-offset anymore (was used for pixel accurate positioning of otherwise strictly line-based API calls). Both should be handled in apps/ now. Change-Id: Iba4b28ccc6e686c7db63e34b51ad4badae983fce
* lcd-common/scroll_engine: Remove unused functions lcd_puts_scroll_style().Thomas Martitz2014-01-07
| | | | Change-Id: Ia4f943b3738ab6e66b0e3f1507c629b36d7eba94
* lcd-common: Remove unused function lcd_puts_style_offset().Thomas Martitz2014-01-07
| | | | Change-Id: I24da23d132f933fe647416dc58e8f50879715423
* lcd-common: Remove unused function lcd_puts_style().Thomas Martitz2014-01-07
| | | | Change-Id: Id2c64c116f79b8e61a7af49b9072b3e884ffb455
* lcd-common: Remove unused function lcd_puts_offset().Thomas Martitz2014-01-07
| | | | Change-Id: I39749bf3db915e5a8ddb6e6f25eb201ea0aaf981
* lcd-common/scroll_engine: Remove unused functions lcd_puts_scroll_offset() ↵Thomas Martitz2014-01-07
| | | | | | and lcd_puts_scroll_style_offset(). Change-Id: Ia84ae88020d06a1cb634942ab5e635fd5d10ac66
* lcd-16bit: Introduce lcd_gradient_fillrect_part().Thomas Martitz2014-01-07
| | | | | | | | It is similar to lcd_gradient_fillrect(), except that it only draws a part of the complete gradient. This can be used to draw only the bottom half of a full gradient. Change-Id: Ib47cc5237f6966e35ba07988bddbb00fd97adf96
* lcd-common/scroll_engine: Introduce lcd_putsxy_scroll_func().Thomas Martitz2014-01-07
| | | | | | | | | | | This function supports installing a custom scroll callback. This will be called when the scrollengine redraws the line. It allows to draw extended styles (or anything your can possible imagine) along with the text. It is also strictly pixel-based, the first pixel-based function that supports scrolling. Change-Id: I57f81ac7b3d08b877aea4cb8afa882f175ebcdfc
* lcd: Fix certain drawmode combinations.Thomas Martitz2014-01-05
| | | | | | | | Some seldomly used drawmode combinations did not work in conjunction with alpha bitmaps and backdrops. Now all should work (see comment added) by using more bits. Change-Id: I2bc96ecf471fa8c1a608a321a235b9c8527b3dc5
* Fix reds. Also apply the new scrolling to lcd charcell (this even uncovered anThomas Martitz2013-12-15
| | | | | | error). Change-Id: I29243bb36b6cec1471bd6c0afc64e00547a68c50
* scroll_engine: Add STYLE_NONE to allow for drawing lines without styling.Thomas Martitz2013-12-14
| | | | | | | This allows to draw lines without destroying styles that were drawn manually (e.g. from apps/) beforehand. Change-Id: I0de290c9343061efb115e1b76da5b76395c2b2af
* scroll_engine: Rename scroll_stop* functions to be more consistent with the ↵Thomas Martitz2013-12-14
| | | | | | lcd api. Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
* bitmap drawing: Use extra bit in mask to avoid nested if() in switch-cases.Thomas Martitz2013-02-12
| | | | | | Speeds up alpha bitmap drawing by up to 10%. mono bitmap drawing is also a tiny bit faster. Change-Id: I5a9379740c1a0091de9c621aabbe57d767ce2905
* 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
* lcd drivers: split lcd_gradient_rect so it is actually usefulJonathan Gordon2012-03-01
| | | | | | | lcd_gradient_rect() was only usable to draw list lines, so split it up and make a generic gradient draw function available to apps/ Change-Id: I665911a90fef239b5e06592ea2763cbeeb74c83f
* lcd/skin_engine: Add the ability to draw onto the backdrop layerJonathan Gordon2012-02-28
| | | | | | | | | | | | | | 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
* lcd drivers: Convert lcd_[remote_]framebuffer to a pointerJonathan Gordon2012-02-28
| | | | | | | | | | Change all lcd drivers to using a pointer to the static framebuffer instead of directly accessing the static array. This will let us later do fun things like dynamic framebuffer sizes (RaaA) or ability to use different buffers for different layers (dynamic skin backdrops!) Change-Id: I0a4d58a9d7b55e6c932131b929e5d4c9f9414b06
* Oops. Left some bits I didn't want to keep.Michael Sevakis2011-12-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31336 a1c6a512-1295-4272-9138-f99709370657
* Convert remaining memframe LCDs that can be convert to common code.Michael Sevakis2011-12-16
| | | | | | | | | | | Massage the way it interfaces a bit to make things more flexible. The chroma_buf scheme on Sansa Connect and Creative ZVx calling the lcd_write_yuv420_lines implementation in lcd-as-memframe.S with five params with a chroma buffer that the function can't use wouldn't work anyway so just have them use the stock implementation (really, how was that working?). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31335 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#12237 (caused by r30302) where centered skin text isnt eqactly centeredJonathan Gordon2011-12-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31246 a1c6a512-1295-4272-9138-f99709370657
* Fix build errors and warnings in the lcd drivers.Thomas Martitz2011-11-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30940 a1c6a512-1295-4272-9138-f99709370657
* Support for transparency in 32bit bitmaps on color targets.Thomas Martitz2011-11-08
| | | | | | | | | This uses the alpha blending capabilities introduced with anti-aliased fonts to draw bitmaps with transparency information. The bmp loader is extended to read this information (pass FORMAT_TRANSPARENT in format). The alpha information will be used when drawing the bitmap. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30937 a1c6a512-1295-4272-9138-f99709370657
* Add new lcd_bmp and lcd_bmp_part APIs.Thomas Martitz2011-11-08
| | | | | | | | 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
* Better fix for FS#12337. Use 0 to make the line height calculated from the ↵Thomas Martitz2011-10-29
| | | | | | font height, as before r30773. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30850 a1c6a512-1295-4272-9138-f99709370657
* - Fix some reds by implementing lcd_get_dpi().Thomas Martitz2011-10-17
| | | | | | | - Use the list item centering capabilities in the plugin lib - Bump plugin ABI for the changed viewport struct (sort the API too). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30775 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#12321 - Touchscreen: List line padding, to more easily select linesThomas Martitz2011-10-17
| | | | | | | | | | | | | | This adds line padding to lists on touchscreens, in order to make lists reasonably useful without huge fonts. It's configurable: * Automatic (default, line height calculated using a lcd dpi aware function) * Off (status quo, line height = font height) * X pixels (from 2 to 50 in even steps) The automatic setting should/aims to Just Work Out Of The Box on all targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30773 a1c6a512-1295-4272-9138-f99709370657
* Touchscreen: Improved scroll thresholdThomas Martitz2010-11-10
| | | | | | | | | Remove the hardcoded (and way too small) scroll threshold (the distance moved in pixels before we think the users wants to scroll) and replace it with something based on the actual DPI of the screen. On Android we call the API for that, on other touchscreens we reimplemented Android's formula (as of 2.2) and calculate it. Flyspray: 11727 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28548 a1c6a512-1295-4272-9138-f99709370657
* Rename {draw,fill}_viewport once more (to draw_border_viewport and ↵Thomas Martitz2010-10-11
| | | | | | | | fill_viewport) and remove the viewport parameter as suggested by Dave Chapman. The parameter wasn't used yet and it's not clear whether it should be a absolute or relative viewport. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28242 a1c6a512-1295-4272-9138-f99709370657
* Add _rect to {draw,fill}_viewport as suggested by Jonathan Gordon to reduce ↵Thomas Martitz2010-10-10
| | | | | | the chance to confuse it with update_viewport(). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28240 a1c6a512-1295-4272-9138-f99709370657
* Two new lcd/multi screen api convinience functions: draw_viewport(), ↵Thomas Martitz2010-10-10
| | | | | | | | | fill_viewport(). They work as the drawrect/fillrect pendants but work on a viewport basis; pass NULL to draw the current viewport (the one set with set_viewport()). In conjunction with action_get_touchscreen_press_in_vp() it should be less of a pain to draw buttons and get presses on them. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28239 a1c6a512-1295-4272-9138-f99709370657
* Pixel-accurate (vertical) list scrolling for touchscreen targets.Thomas Martitz2010-10-06
| | | | | | | | Looks much smoother now as you don't scroll by whole lines anymore. Add some functions lcd driver to enable the line based scrolling engine to draw the lines with a pixel-based y-offset. This should also allow for a sensible kinetic scrolling mechanism (still a todo). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28214 a1c6a512-1295-4272-9138-f99709370657
* Implement lcd(_remote)_putsxyf() and export to pluginsRafaël Carré2010-08-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27921 a1c6a512-1295-4272-9138-f99709370657
* FS#10756 - Free unused init codeThomas Martitz2010-03-03
| | | | | | | Introduce a new .init section for initialisation code, so that it can be copied to an area which is later overwritten before calling. The stack/bss can then overwrite that code, effectively freeing the code size that the initialisation routines need. Gives a few kB ram usage back. Only implemented for PP and as3525 so far. More targets could be added, as well as more functions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25013 a1c6a512-1295-4272-9138-f99709370657
* Fix more tabsAndree Buschmann2010-01-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24154 a1c6a512-1295-4272-9138-f99709370657
* Convert lcd_activation callbacks to use the event system to allow for ↵Thomas Martitz2009-10-20
| | | | | | | | | multiple parallel callbacks (for custom statusbar). Increase maximum event count as we need more (I actually had a report about it during custom statusbar testing). Removed corresponding functions from the core and plugin api. Bump min version and sort. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23302 a1c6a512-1295-4272-9138-f99709370657
* Revise r23225 a bit, removing the debug_printf function and implementing ↵Nils Wallménius2009-10-17
| | | | | | more generic lcd_(remote)_putsf function(s) instead and use those in more places git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23233 a1c6a512-1295-4272-9138-f99709370657
* RTL: Cosmetic changes, no functional change - Rename constantsTomer Shalev2009-10-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23117 a1c6a512-1295-4272-9138-f99709370657
* Add a center flag, next to the rtl flag, for viewports. That results in any ↵Thomas Martitz2009-10-11
| | | | | | | | text being drawn centered. It overrides the RTL flag if set. Simplify splashes and time menu by using it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23105 a1c6a512-1295-4272-9138-f99709370657
* Use macro to test viewport's RTL flagTomer Shalev2009-10-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22978 a1c6a512-1295-4272-9138-f99709370657
* Implement RTL as a viewport's bit-fieldTomer Shalev2009-10-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22968 a1c6a512-1295-4272-9138-f99709370657
* Fix typos in the commentAlexander Levin2009-09-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22625 a1c6a512-1295-4272-9138-f99709370657