path: root/firmware/export/lcd-remote.h
AgeCommit message (Collapse)AuthorFilesLines
2020-10-31lcd_framebuffer bugfixes, sanity checksWilliam Wilgus1-3/+3
several issues I saw that could pontentially cause problems scroll engine doesn't take text height into account when checking bounds NBELEMS was one whole row too large hopefully I got them right this time Change-Id: If303da8320429c3964fc675351cb088d46303745
2020-10-26LCD core move buf ptr and address look up function viewport structWilliam Wilgus1-36/+38
I'm currently running up against the limitations of the lcd_draw functions I want these functions to be able to be used on any size buffer not just buffers with a stride matching the underlying device [DONE] allow the framebuffer to be decoupled from the device framebuffer [DONE need examples] allow for some simple blit like transformations [DONE] remove the device framebuffer from the plugin api [DONE}ditto remote framebuffer [DONE] remove _viewport_get_framebuffer you can call struct *vp = lcd_set_viewport(NULL) and vp->buffer->fb_ptr while remote lcds may compile (and work in the sim) its not been tested on targets [FIXED] backdrops need work to be screen agnostic [FIXED] screen statusbar is not being combined into the main viewport correctly yet [FIXED] screen elements are displayed incorrectly after switch to void* [FIXED] core didn't restore proper viewport on splash etc. [NEEDS TESTING] remote lcd garbled data [FIXED] osd lib garbled screen on bmp_part [FIXED] grey_set_vp needs to return old viewport like lcd_set_viewport [FIXED] Viewport update now handles viewports with differing buffers/strides by copying to the main buffer [FIXED] splash on top of WPS leaves old framebuffer data (doesn't redraw) [UPDATE] refined this a bit more to have clear_viewport set the clean bit and have skin_render do its own screen clear scrolling viewports no longer trigger wps refresh also fixed a bug where guisyncyesno was displaying and then disappearing [ADDED!] New LCD macros that allow you to create properly size frame buffers in you desired size without wasting bytes (LCD_ and LCD_REMOTE_) LCD_STRIDE(w, h) same as STRIDE_MAIN LCD_FBSTRIDE(w, h) returns target specific stride for a buffer W x H LCD_NBELEMS(w, h) returns the number of fb_data sized elemenst needed for a buffer W x H LCD_NATIVE_STRIDE(s) conversion between rockbox native vertical and lcd native stride (2bitH) test_viewports.c has an example of usage [FIXED!!] 2bit targets don't respect non-native strides [FIXED] Few define snags Change-Id: I0d04c3834e464eca84a5a715743a297a0cefd0af
2014-01-12put_line/scrolling: Make the scroll engine inform custom scrollers about ↵Thomas Martitz1-2/+2
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
2014-01-07lcd-common/scroll_engine: Remove unused functions lcd_puts_style_xyoffset() ↵Thomas Martitz1-6/+0
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
2014-01-07lcd-common/scroll_engine: Remove unused functions lcd_puts_scroll_style().Thomas Martitz1-2/+0
Change-Id: Ia4f943b3738ab6e66b0e3f1507c629b36d7eba94
2014-01-07lcd-common: Remove unused function lcd_puts_style_offset().Thomas Martitz1-2/+0
Change-Id: I24da23d132f933fe647416dc58e8f50879715423
2014-01-07lcd-common: Remove unused function lcd_puts_style().Thomas Martitz1-2/+0
Change-Id: Id2c64c116f79b8e61a7af49b9072b3e884ffb455
2014-01-07lcd-common: Remove unused function lcd_puts_offset().Thomas Martitz1-2/+0
Change-Id: I39749bf3db915e5a8ddb6e6f25eb201ea0aaf981
2014-01-07lcd-common/scroll_engine: Remove unused functions lcd_puts_scroll_offset() ↵Thomas Martitz1-5/+0
and lcd_puts_scroll_style_offset(). Change-Id: Ia84ae88020d06a1cb634942ab5e635fd5d10ac66
2014-01-07lcd-common/scroll_engine: Introduce lcd_putsxy_scroll_func().Thomas Martitz1-0/+3
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
2013-12-14scroll_engine: Add STYLE_NONE to allow for drawing lines without styling.Thomas Martitz1-3/+0
This allows to draw lines without destroying styles that were drawn manually (e.g. from apps/) beforehand. Change-Id: I0de290c9343061efb115e1b76da5b76395c2b2af
2013-12-14scroll_engine: Rename scroll_stop* functions to be more consistent with the ↵Thomas Martitz1-3/+0
lcd api. Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
2012-12-09Add the 9 segment lcd funciton to remote lcdsJonathan Gordon1-0/+2
Change-Id: I00f9a067522624a87befcf95a811b49ad685029c
2012-02-28lcd/skin_engine: Add the ability to draw onto the backdrop layerJonathan Gordon1-0/+1
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-28lcd drivers: Convert lcd_[remote_]framebuffer to a pointerJonathan Gordon1-1/+4
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
2012-01-07lcd-remote-target.h: Use only in firmware/target/Rafaël Carré1-4/+4
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2012-01-07remote_detect(): move to lcd-remote.hRafaël Carré1-52/+58
Reorganize lcd-remote.h so it works for iaudio-m3 too git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2012-01-07move lcd remote common declarations to lcd-remote.hRafaël Carré1-0/+5
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2012-01-07TARGET_TREE is not needed anymoreRafaël Carré1-1/+1
spotted by jhMikeS git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-11-08Add new lcd_bmp and lcd_bmp_part APIs.Thomas Martitz1-1/+3
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:// a1c6a512-1295-4272-9138-f99709370657
2010-10-11Forgot to update lcd-remote.hThomas Martitz1-2/+2
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-10-11Rename {draw,fill}_viewport once more (to draw_border_viewport and ↵Thomas Martitz1-2/+2
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:// a1c6a512-1295-4272-9138-f99709370657
2010-10-10Add _rect to {draw,fill}_viewport as suggested by Jonathan Gordon to reduce ↵Thomas Martitz1-2/+2
the chance to confuse it with update_viewport(). git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-10-10Two new lcd/multi screen api convinience functions: draw_viewport(), ↵Thomas Martitz1-0/+2
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:// a1c6a512-1295-4272-9138-f99709370657
2010-10-06Fix targets with remote display, forgot to add the new functions to their ↵Thomas Martitz1-0/+6
header. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-08-28Implement lcd(_remote)_putsxyf() and export to pluginsRafaël Carré1-0/+1
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2009-10-17Revise r23225 a bit, removing the debug_printf function and implementing ↵Nils Wallménius1-0/+1
more generic lcd_(remote)_putsf function(s) instead and use those in more places git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2008-12-26Latest work on the bmp on-load scaler:Andrew Mahone1-0/+4
Macros for calculating size needed for bitmap load and scaling, so that these can be compile-time constant when their inputs are. Reduce size of bayer dither by chopping all but first row of dither matrix, and replacing 2D lookup with 1D lookup and small calculation. Move some functions not related to actual bmp file loading out of bmp.c. A smaller brightness() for mono targets, and a higher-quality one for greyscale targets, both replacing the division by 10 with a shift. Port of the linear and area scalers to greyscale targets, this costs some binsize but produces better output even when dithered to 2bpp. Move duplicated row output code from inside vertical scalers to a separate row output function. Move some multiplies out of the line scaler, for a small speedup and code size reduction, as well as a small improvement in accuracy for the upscaling case. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg1-2/+4
later. We still need to hunt down snippets used that are not. 1324 modified files... git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2008-06-23FS#9051 - remove LCD margins... use viewports if you need them...Jonathan Gordon1-3/+0
NOTE to WPS people.... %m has been removed, but (i think) because of the other %m tags it wont fail if you try loading a wps with %m|..|, it will just be ignored. Also note that if the statusbar is enabled the default viewport is 8 pixels shorter than when its not, i.e (0,0) is really (0,8) if the statusbar is shown... I dont think this will be a major issue because almost no WPS show the bar and use bitmaps... text only WPS shouldnt be affected. Please report problem screens in git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2008-05-05Convert the whole codebase to UTF-8, except docs/COMMITTERS and ↵Nicolas Pennequin1-1/+1
tools/creative.c, which need checking. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2008-03-26Major cleanup of checkwps - fix all warnings and add a script to build ↵Dave Chapman1-2/+1
versions for all supported targets (plus some unsupported ones). You now need to run the version of checkwps that matches the device your WPS is for. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2008-03-12Make the LCD remote work in the iAudio M3, M5 and X5 bootloaders. * Fix ↵Jens Arnold1-3/+5
viewport related init bug in the 2 bit vertically interleaved LCD driver. * Fix low bat warning in iaudio bootloader - voltages are in millivolts now. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2008-01-08Add the viewport functions to the screens API, including a new getfont() ↵Dave Chapman1-0/+1
function to return the font used by the current viewport. A change to the screens API makes the plugin API incompatible, so we bump version and sort. Also commit the test_viewports plugin (not built by default). This is some more of FS#8385. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2008-01-07Add viewport capabilities to all the LCD drivers, and adapt scrolling code. ↵Dave Chapman1-0/+7
This is the firmware/ part of FS#8385 - the changes to the WPS code still need more work and will be committed at a later date. NOTE: There are no user-visible changes with this commit - just the infrastructure. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2007-10-15Remove the "invert scroll" code since it's not used anywhere anymore (and it ↵Antoine Cellerier1-1/+0
was broken on color targets with gradients anyway). Closes FS #7875. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2007-08-12Enable a lot more features for simulators and add stubs where necessary, ↵Nils Wallménius1-1/+1
simulators should now work with identical lng and voice files as the respective target git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2007-07-28Fix warnings and errors. Remove some added stuff that wasn't needed afterall.Michael Sevakis1-1/+0
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2007-07-28Scroll on main and remote with a single thread. Change the way system ↵Michael Sevakis1-4/+1
messages are defined before running out is an issue (which requires a full update of rockbox on the player). git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2007-06-17Give color targets the ability to display each LCD line a different color ↵Brandon Low1-2/+2
and use this newfangled ability to provide themable colored file types. See the comments on read_color_theme_file and the sample.colors file provided for how to use this. .colors files go in themes directory for now. This separate line color function should be trivial to add to menus and wpss. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2007-04-25Add backdrop support for LCD remotes with depth > 1-bit. Only WPS backdrops, ↵Nicolas Pennequin1-0/+2
but the groundwork is laid for main backdrops too (all that's really needed are menus to set/clear them). git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2007-02-25Move target specific parts of the H100 remote LCD driver to target tree.Jens Arnold1-3/+9
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2007-02-20Introduced LCD_FBHEIGHT in addition to the already existing LCD_FBWIDTH to ↵Jens Arnold1-3/+14
ease framebuffer handling a bit. Added equivalent definitions for the remote LCD. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2006-11-26Backdrop support in the X5 remote LCD driver. Still needs to be wired to the ↵Jens Arnold1-0/+5
UI and settings. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2006-11-14Removed anachronisms introduced with low battery shutdown patch.Michael Sevakis1-0/+1
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2006-10-31Removed remnants of deprecated lcd_roll().Jens Arnold1-1/+0
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2006-10-14Added a small interface to screens to translate colors into remote gray ↵Michael Sevakis1-4/+12
levels on the x5. Splash screens paint properly with light gray. Should be adapted to a more general approach in the future. A few trailing whitespace trimmings got into a couple files but that is fine. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2006-07-28Add a define for unplugged remoteHristo Kovachev1-0/+1
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2006-07-28LCD drivers: * Slight speedup for 2bit greyscale drivers. Use the same ↵Jens Arnold1-20/+89
scrolltext drawing anywhere. * Cleanup, fixes and definitions in preparation for X5 remote. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2006-02-17Remote type autodetection on iriver, remote_type() returns ↵Linus Nielsen Feltzing1-0/+8
REMOTETYPE_H100_LCD, REMOTETYPE_H300_LCD or REMOTETYPE_H300_NONLCD git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657