summaryrefslogtreecommitdiffstats
path: root/lib/gui
Commit message (Collapse)AuthorAgeFilesLines
* graphics_utils: check for valid framebuffer before creating a screenSascha Hauer2015-11-131-0/+4
| | | | | | Otherwise we crash later when we try to print on that screen. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: implement blitting screen areasSascha Hauer2015-08-201-0/+19
| | | | | | | So far we only supported blitting the whole screen from the shadow fb to the framebuffer. Add a function to blit areas. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: Use fb provided shadowfb for offscreen renderingSascha Hauer2015-08-201-17/+7
| | | | | | | The fb core now has builtin support for offscreen rendering, use this and drop offscreen handling in the gui code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fb: return original fb_info in FBIOGET_SCREENINFOSascha Hauer2015-08-201-4/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* graphics_utils: Let fb_open allocate the screenSascha Hauer2015-07-203-35/+61
| | | | | | | | | Allocate the screen dynamically in fb_open. This opens the way to create a fb_create_screen function which takes a struct fb_info * instead of a filename. This is suitable for the framebuffer console which already has a struct fb_info *. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* graphics_utils: add function to create pixel from rgb tripletSascha Hauer2015-07-161-6/+26
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* graphics_utils: Export get_pixelSascha Hauer2015-07-161-2/+12
| | | | | | | | | | | get_pixel converts a 32bit trgb color into framebuffer format. This is useful for other code aswell, so export it. Other functions in the graphics utils code use the name get/set_pixel aswell, but instead of converting data they get a pixel from the framebuffer or set a pixel on the framebuffer. To separate from these rename the function to gu_hex_to_pixel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* graphics_utils: Add function to invert an areaSascha Hauer2015-07-161-0/+19
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: Fix typo in function nameSascha Hauer2015-07-152-2/+2
| | | | | | It's a render buffer, not a redering buffer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* graphic_utils: Add a common namespace to functionsSascha Hauer2015-07-153-14/+14
| | | | | | | This adds a common namespace to the graphic functions. We use gu_ for graphic_utils. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-07-031-4/+4
|\
| * image_renderer: Use read_file_2Sascha Hauer2015-06-261-4/+4
| | | | | | | | | | | | | | This returns a proper error code and allows us to print a proper error message which might not always be -ENOMEM. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bmp support: Use unaligned accessorsSascha Hauer2015-06-231-5/+6
|/ | | | | | | Some fields in the bmp header are unaligned. Use unaligned accessor functions to acces them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* graphic_utils: set_pixel only write 16bit in 16bit modeJean-Christophe PLAGNIOL-VILLARD2015-01-051-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* move file helper functions to separate fileSascha Hauer2014-08-071-0/+1
| | | | | | | | | | We have our file helper functions in several places. Move them all to lib/libfile.c. With this we no longer have file helpers in fs/fs.c which contains the core fs functions and no functions in lib/libbb.c which are not from busybox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: IMAGE_RENDERER does not depend on VIDEOSascha Hauer2014-06-051-1/+0
| | | | | | | | | Image renderer may not be particularly useful without framebuffer support, but technically it does not depend on VIDEO. Fixes: warning: (CMD_SPLASH) selects IMAGE_RENDERER which has unmet direct dependencies (VIDEO) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: Fix resource leakAlexander Shiyan2014-04-231-0/+4
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: fix signedness mixups in printf format specifiersLucas Stach2014-04-231-1/+1
| | | | | | | | | This most likely doesn't fix any real bugs, but it's the right thing to do and reduces the noise level with static checkers. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* splash: Print error message when no renderer is foundSascha Hauer2014-03-171-0/+2
| | | | | | | the splash command silently fails when no renderer is found for an image type. Print an error message in this case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* barebox: remove double semicolonsAlexander Aring2013-11-181-2/+2
| | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: Fix signed/unsigned arguments for printfAlexander Shiyan2013-11-111-1/+1
| | | | | | | "%u" in format string requires a unsigned integer. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: convert the bmp renderer to respect line_lengthAndre Heider2013-11-061-4/+4
| | | | | Signed-off-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: convert graphic utils to respect line_lengthAndre Heider2013-11-061-5/+5
| | | | | Signed-off-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: fix format specifiersSascha Hauer2013-01-271-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* graphic_utils/fb_open: fix fbsizeJean-Christophe PLAGNIOL-VILLARD2013-01-161-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'kconfig'Sascha Hauer2012-12-081-1/+1
|\
| * Cleanup Kconfig filesAlexander Shiyan2012-12-081-1/+1
| | | | | | | | | | | | | | | | | | This patch provides a global cleanup barebox Kconfig files. This includes replacing spaces to tabs, formatting in accordance format, removing extraneous lines and spaces. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | filetype: Pass bufsizeSascha Hauer2012-12-031-3/+3
|/ | | | | | | | | | Pass the buffer size to the file detection code. This makes sure we do not read past the buffer. This is especially useful for ext filesystem detection as the magic is at byte offset 1080. Also introduce a FILE_TYPE_SAFE_BUFSIZE define which is set to the minimum bufsize the detection code needs to detect all known filetypes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bmp: specify we need to keep the data read from the fileJean-Christophe PLAGNIOL-VILLARD2012-11-211-0/+1
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: blit the surface on demandJean-Christophe PLAGNIOL-VILLARD2012-10-043-6/+8
| | | | | | | | Do not blit the surface everytime we write an image As we want to able to render multiple image this will cause 1 blit per image; Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* graphic_utils: introduce common fb_open/closeJean-Christophe PLAGNIOL-VILLARD2012-10-043-9/+56
| | | | | | | To open, memmap, get the fb_info and if needed allocate the offscreen buffer Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: introduce screen and surface to factorize and simplify codeJean-Christophe PLAGNIOL-VILLARD2012-10-043-41/+48
| | | | | | | | | | Instead of passing hundreds of parameter, just pass the right structure. struct screen represent the screen with a without double buffering. struct surface represent the part of the screen we want to render. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* graphic_utils: pass image so we can draw only the visible part of the imageJean-Christophe PLAGNIOL-VILLARD2012-10-042-4/+5
| | | | | | | This is needed if the image is bigger than the screen. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: move gui file to include/gui and lib/guiJean-Christophe PLAGNIOL-VILLARD2012-10-0414-0/+9246
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>