summaryrefslogtreecommitdiffstats
path: root/firmware/export/lcd.h
AgeCommit message (Collapse)AuthorFilesLines
2010-11-10Touchscreen: Improved scroll thresholdThomas Martitz1-0/+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
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://svn.rockbox.org/rockbox/trunk@28242 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://svn.rockbox.org/rockbox/trunk@28240 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://svn.rockbox.org/rockbox/trunk@28239 a1c6a512-1295-4272-9138-f99709370657
2010-10-06Pixel-accurate (vertical) list scrolling for touchscreen targets.Thomas Martitz1-2/+8
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
2010-08-28Implement lcd(_remote)_putsxyf() and export to pluginsRafaël Carré1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27921 a1c6a512-1295-4272-9138-f99709370657
2010-03-03FS#10756 - Free unused init codeThomas Martitz1-2/+2
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
2010-01-03Fix more tabsAndree Buschmann1-5/+5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24154 a1c6a512-1295-4272-9138-f99709370657
2009-10-20Convert lcd_activation callbacks to use the event system to allow for ↵Thomas Martitz1-3/+7
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
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://svn.rockbox.org/rockbox/trunk@23233 a1c6a512-1295-4272-9138-f99709370657
2009-10-11RTL: Cosmetic changes, no functional change - Rename constantsTomer Shalev1-4/+4
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23117 a1c6a512-1295-4272-9138-f99709370657
2009-10-11Add a center flag, next to the rtl flag, for viewports. That results in any ↵Thomas Martitz1-2/+6
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
2009-10-06Use macro to test viewport's RTL flagTomer Shalev1-1/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22978 a1c6a512-1295-4272-9138-f99709370657
2009-10-05Implement RTL as a viewport's bit-fieldTomer Shalev1-0/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22968 a1c6a512-1295-4272-9138-f99709370657
2009-09-04Fix typos in the commentAlexander Levin1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22625 a1c6a512-1295-4272-9138-f99709370657
2009-09-04Explain the stride and fix the player.Karl Kurbjun1-19/+62
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22616 a1c6a512-1295-4272-9138-f99709370657
2009-09-04Fix STRIDE macro for multiscreen and add stride support for picture lib.Karl Kurbjun1-2/+14
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22615 a1c6a512-1295-4272-9138-f99709370657
2009-08-29Add stride defines to support vertical stridesKarl Kurbjun1-0/+7
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22546 a1c6a512-1295-4272-9138-f99709370657
2009-08-19Slight cleanup in lcd.h: kill fixme and remove useless include, add some ↵Nils Wallménius1-14/+0
includes elsewhere and add a stub for sims instead of ifdef git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22431 a1c6a512-1295-4272-9138-f99709370657
2009-06-21Do not use lcd_blit_yuv() if MEMORYSIZE <= 2, since mpegplayer won't run ↵Rafaël Carré1-0/+2
anyway (and won't build) Only affected target: Sansa c200v2 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21453 a1c6a512-1295-4272-9138-f99709370657
2009-05-25* read_bmp_*(): add FORMAT_RETURN_SIZEMaurus Cuelenaere1-0/+1
* Lua: add luaL_checkboolean() & luaL_optboolean() * Lua: add read_bmp_file git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21074 a1c6a512-1295-4272-9138-f99709370657
2009-04-09M:Robe 500: More LCD initialization, QVGA (vs. VGA) is now enabled by ↵Karl Kurbjun1-0/+7
default for performance, 256 color palette mode added, include some linker cleanups and reorganization. Doom and MPEGPlayer now run reaonably well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20664 a1c6a512-1295-4272-9138-f99709370657
2009-04-01Add initial support for changing the LCD mode in MPEG player for hardware ↵Karl Kurbjun1-0/+7
YUV conversion (256 color palette mode will also be added for doom and rockboy). This fixes the LCD mode/colors when MPEGPlayer exits. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20600 a1c6a512-1295-4272-9138-f99709370657
2009-03-17Rework lcd_enabled and lcd_set/call_enable hookThomas Martitz1-9/+9
a) lcd_enabled() is now lcd_active(), and is available for HAVE_LCD_SLEEP only targets (e.g. ipod video) too. It was depandent on HAVE_LCD_ENALE only before b) rename the hook accordingly, and implement the hook for other other targets too (e.g. the clip [the only mono target with lcd_enable/lcd_sleep yet, so the code is still in the lcd driver], ipod, fuze, c200) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20331 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://svn.rockbox.org/rockbox/trunk@19592 a1c6a512-1295-4272-9138-f99709370657
2008-12-09resize-on-load for bitmap files on 2bpp and color targetsAndrew Mahone1-0/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19374 a1c6a512-1295-4272-9138-f99709370657
2008-10-31Make lcd_set_enable_hook() conditional on HAVE_LCD_ENABLE and HAVE_LCD_COLORRafaël Carré1-0/+4
This prepares for the Clip which will define HAVE_LCD_ENABLE but won't need the hook since the internal LCD framebuffer is updated regardless if the display is on or off. firmware/drivers/lcd-16bit.c has not been modified since HAVE_LCD_COLOR is obviously defined here git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18951 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... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-23FS#9051 - remove LCD margins... use viewports if you need them...Jonathan Gordon1-5/+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 http://forums.rockbox.org/index.php?topic=17358.0 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17763 a1c6a512-1295-4272-9138-f99709370657
2008-05-28Fix yellow.Michael Sevakis1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17642 a1c6a512-1295-4272-9138-f99709370657
2008-05-28Targets with HAVE_LCD_ENABLE: Provide a means to receive notifications when ↵Michael Sevakis1-0/+4
the lcd is enabled and the image is refreshed so overlayed drawing can also be refreshed. Chiefly mpegplayer needs this so it can redraw the YUV data after the backlight is turned on while paused or when using 'Set Start Time'. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17640 a1c6a512-1295-4272-9138-f99709370657
2008-05-05Change the default background colour to black on colour targets. It fits ↵Barry Wardell1-2/+2
better with the default theme and also with the bootloaders. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17380 a1c6a512-1295-4272-9138-f99709370657
2008-03-24Consistent naming scheme the various blit functions. * Removed ↵Jens Arnold1-5/+5
lcd_blit_mono() for colour targets. Plugin API became incompatible, so sort, clean up & bump. * Implemented lcd_blit_mono() for M3. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16775 a1c6a512-1295-4272-9138-f99709370657
2008-03-19M3: Make remote LCD hotplug work, and make 'backlight on button hold' use ↵Jens Arnold1-0/+6
the correct hold switch. * Kill a warning. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16711 a1c6a512-1295-4272-9138-f99709370657
2008-03-12Fix Player warnings. Charcell needs fb_data properly defined as well.Jens Arnold1-0/+5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16647 a1c6a512-1295-4272-9138-f99709370657
2008-03-12More iAudio M3 work. Bootloader compiles, but doesn't work yet.Jens Arnold1-1/+8
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16645 a1c6a512-1295-4272-9138-f99709370657
2008-01-09Greyscale library: Changed the internal data format once more (separated ↵Jens Arnold1-7/+3
pixel values and phases), allowing for further optimisation of drawing, scrolling etc. * Optimised grey phase blitting in the core reduces CPU load on all architectures, most significantly on coldfire. Previous version was too slow to keep up at 45MHz, leading to unwanted graininess (update frequency was halved). Also fixed screendump on 2bpp targets with vertical pixel packing. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16043 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://svn.rockbox.org/rockbox/trunk@16022 a1c6a512-1295-4272-9138-f99709370657
2008-01-07Add viewport capabilities to all the LCD drivers, and adapt scrolling code. ↵Dave Chapman1-0/+28
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://svn.rockbox.org/rockbox/trunk@16018 a1c6a512-1295-4272-9138-f99709370657
2008-01-04All-new greyscale library, replacing the old one. Features: (1) ↵Jens Arnold1-1/+10
Drawing/updating is faster than the old grayscale lib at full depth. (2) Always 129 shades instead of 2..33 shades. (3) No graininess caused by frequent updates (mpegplayer, doom, ...). (4) Needs less memory than the old grayscale lib at full depth. * The tradeoff is slightly higher CPU load in the ISR (frames are calculated 'live') and an extra function in the core. * Ported all plugins which used the graylib to use the new one. * Some slight optimisations for archos and H1x0 LCD update. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15998 a1c6a512-1295-4272-9138-f99709370657
2007-12-06Make the "current line" value in the gradient style code zero-based, and an ↵Nicolas Pennequin1-2/+2
attempt at more understandable names and better comments. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15886 a1c6a512-1295-4272-9138-f99709370657
2007-11-19Accept FS#7901 by Akio Idehara: Fix gradient for scrolling lines when more ↵Nicolas Pennequin1-0/+8
than one line is selected git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15698 a1c6a512-1295-4272-9138-f99709370657
2007-11-11When unpacking a 16-bit color value to 24 bits, repeat the high bits of each ↵Magnus Holmgren1-3/+3
component rather than the low bits. This makes the RGB value displayed in the color picker (and in settings files) more accurate. E.g., when using the reported color in a background, it will no longer be dithered. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15589 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://svn.rockbox.org/rockbox/trunk@15125 a1c6a512-1295-4272-9138-f99709370657
2007-09-30Save a few bytes in the line selector style handling code.Antoine Cellerier1-1/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14927 a1c6a512-1295-4272-9138-f99709370657
2007-09-29Fix the LCD line remaining active after shutdown on grayscale ipods ↵Nicolas Pennequin1-0/+4
(FS#5199). Original patch by Tomasz Mon, modified by me. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14907 a1c6a512-1295-4272-9138-f99709370657
2007-09-27FS#7808 by Tom Ross, Ken Fazzone and me, with help from Antoine Cellerier.Nicolas Pennequin1-0/+8
Add two new line selector types: solid colour and gradient. Solid colour only uses the primary colour setting. The secondary colour setting is used for the gradient. Text colour for the selected item is also changeable. These new settings are a bit controversial so they may be removed later. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14868 a1c6a512-1295-4272-9138-f99709370657
2007-09-25Dithering option for mpegplayer on gigabeat-f/x and e200. Assembly IDCT for ↵Michael Sevakis1-1/+3
ARm just to make it all work more nicely. Move UI simulator YUV code to its core to adapt it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14851 a1c6a512-1295-4272-9138-f99709370657
2007-07-31Straignten out some issues with HAVE_LCD_ENABLE. 1g/2g/3g had it defined but ↵Michael Sevakis1-23/+23
it shouldn't have been. lcd_enabled() was only available as a real function on gigabeat but others can use that too. Markup lcd.h a bit because I got a bit lost in it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14100 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://svn.rockbox.org/rockbox/trunk@14036 a1c6a512-1295-4272-9138-f99709370657