9
0
Fork 0

gui: move gui file to include/gui and lib/gui

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-09-26 11:59:00 +02:00 committed by Sascha Hauer
parent 3dc70b2255
commit da0d61770a
22 changed files with 95 additions and 69 deletions

View File

@ -494,6 +494,21 @@ config CMD_MTEST_ALTERNATIVE
endmenu
menu "video command "
if VIDEO
config CMD_SPLASH
bool
select IMAGE_RENDERER
prompt "splash"
help
show bmp files on framebuffer devices
endif
endmenu
config CMD_TIMEOUT
tristate
prompt "timeout"
@ -557,14 +572,6 @@ config CMD_LSMOD
depends on MODULES
prompt "lsmod"
config CMD_SPLASH
bool
depends on VIDEO
select IMAGE_RENDERER
prompt "splash"
help
show bmp files on framebuffer devices
config CMD_GPIO
bool
depends on GENERIC_GPIO

View File

@ -7,8 +7,8 @@
#include <getopt.h>
#include <fcntl.h>
#include <fb.h>
#include <image_renderer.h>
#include <graphic_utils.h>
#include <gui/image_renderer.h>
#include <gui/graphic_utils.h>
static int do_splash(int argc, char *argv[])
{

View File

@ -11,7 +11,7 @@
#include <mach/linux.h>
#include <fb.h>
#include <errno.h>
#include <graphic_utils.h>
#include <gui/graphic_utils.h>
static void sdlfb_enable(struct fb_info *info)
{

20
include/gui/image.h Normal file
View File

@ -0,0 +1,20 @@
/*
* Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
*
* GPL v2
*/
#ifndef __GUI_IMAGE_H__
#define __GUI_IMAGE_H__
struct image_renderer;
struct image {
void *data;
struct image_renderer *ir;
int height;
int width;
int bits_per_pixel;
};
#endif /* __IMAGE_RENDERER_H__ */

View File

@ -12,14 +12,7 @@
#include <errno.h>
#include <linux/err.h>
#include <fb.h>
struct image {
void *data;
struct image_renderer *ir;
int height;
int width;
int bits_per_pixel;
};
#include <gui/image.h>
struct image_renderer {
enum filetype type;

View File

@ -38,40 +38,6 @@ config BITREV
config QSORT
bool
config IMAGE_RENDERER
bool
depends on VIDEO
select FILETYPE
if IMAGE_RENDERER
config BMP
bool "bmp"
config PNG
bool "png"
select ZLIB
if PNG
choice
prompt "PNG Lib"
config LODEPNG
bool "lodePNG"
help
This PNG library supports most PNG formats.
config PICOPNG
bool "picoPNG"
help
This PNG library only supports RGBA PNG8 but is much smaller
in binary size than lodepng.
endchoice
endif
endif
source lib/gui/Kconfig
endmenu

View File

@ -34,8 +34,4 @@ obj-$(CONFIG_UNCOMPRESS) += uncompress.o
obj-$(CONFIG_BCH) += bch.o
obj-$(CONFIG_BITREV) += bitrev.o
obj-$(CONFIG_QSORT) += qsort.o
obj-$(CONFIG_BMP) += bmp.o
obj-$(CONFIG_IMAGE_RENDERER) += image_renderer.o graphic_utils.o
obj-$(CONFIG_PNG) += png.o
obj-$(CONFIG_LODEPNG) += png_lode.o lodepng.o
obj-$(CONFIG_PICOPNG) += png_pico.o picopng.o
obj-y += gui/

39
lib/gui/Kconfig Normal file
View File

@ -0,0 +1,39 @@
menu "Library gui routines "
config IMAGE_RENDERER
bool
depends on VIDEO
select FILETYPE
if IMAGE_RENDERER
config BMP
bool "bmp"
config PNG
bool "png"
select ZLIB
if PNG
choice
prompt "PNG Lib"
config LODEPNG
bool "lodePNG"
help
This PNG library supports most PNG formats.
config PICOPNG
bool "picoPNG"
help
This PNG library only supports RGBA PNG8 but is much smaller
in binary size than lodepng.
endchoice
endif
endif
endmenu

5
lib/gui/Makefile Normal file
View File

@ -0,0 +1,5 @@
obj-$(CONFIG_BMP) += bmp.o
obj-$(CONFIG_IMAGE_RENDERER) += image_renderer.o graphic_utils.o
obj-$(CONFIG_PNG) += png.o
obj-$(CONFIG_LODEPNG) += png_lode.o lodepng.o
obj-$(CONFIG_PICOPNG) += png_pico.o picopng.o

View File

@ -4,9 +4,9 @@
#include <fb.h>
#include "bmp_layout.h"
#include <asm/byteorder.h>
#include <graphic_utils.h>
#include <gui/graphic_utils.h>
#include <init.h>
#include <image_renderer.h>
#include <gui/image_renderer.h>
struct image *bmp_open(char *inbuf, int insize)
{

View File

@ -1,6 +1,6 @@
#include <common.h>
#include <fb.h>
#include <graphic_utils.h>
#include <gui/graphic_utils.h>
static u32 get_pixel(struct fb_info *info, u32 color)
{

View File

@ -6,7 +6,7 @@
#include <common.h>
#include <fb.h>
#include <image_renderer.h>
#include <gui/image_renderer.h>
#include <errno.h>
#include <fs.h>
#include <malloc.h>

View File

@ -4,8 +4,8 @@
#include <fb.h>
#include <asm/byteorder.h>
#include <init.h>
#include <image_renderer.h>
#include <graphic_utils.h>
#include <gui/image_renderer.h>
#include <gui/graphic_utils.h>
#include <linux/zlib.h>
#include "png.h"

View File

@ -4,8 +4,8 @@
#include <fb.h>
#include <asm/byteorder.h>
#include <init.h>
#include <image_renderer.h>
#include <graphic_utils.h>
#include <gui/image_renderer.h>
#include <gui/graphic_utils.h>
#include <linux/zlib.h>
#include "lodepng.h"

View File

@ -4,8 +4,8 @@
#include <fb.h>
#include <asm/byteorder.h>
#include <init.h>
#include <image_renderer.h>
#include <graphic_utils.h>
#include <gui/image_renderer.h>
#include <gui/graphic_utils.h>
#include <linux/zlib.h>
#include "picopng.h"