[gui]remove gui_demo.h

This commit is contained in:
tangyuxin 2017-12-06 21:01:46 +08:00
parent 056ed06310
commit 45a5745acb
3 changed files with 2 additions and 27 deletions

View File

@ -5,6 +5,6 @@ src = Glob('*.c')
CPPPATH = [cwd] CPPPATH = [cwd]
group = DefineGroup('gui_demo', src, depend = ['RTGUI_USING_DEMO'], CPPPATH = CPPPATH) group = DefineGroup('gui_demo', src, depend = ['RT_USING_GUIENGINE', 'RTGUI_USING_DEMO'], CPPPATH = CPPPATH)
Return('group') Return('group')

View File

@ -9,7 +9,7 @@
#include <rtgui/widgets/window.h> #include <rtgui/widgets/window.h>
#include <rtgui/dc.h> #include <rtgui/dc.h>
#include "gui_demo.h" extern const static unsigned char _picture_png[];
static rt_bool_t show_demo(struct rtgui_win *win) static rt_bool_t show_demo(struct rtgui_win *win)
{ {
@ -111,25 +111,6 @@ static void rt_gui_demo_entry(void *parameter)
int rt_gui_demo_init(void) int rt_gui_demo_init(void)
{ {
rt_thread_t tid; rt_thread_t tid;
rt_device_t device;
rt_err_t err;
device = rt_device_find("lcd");
if (device == RT_NULL)
{
rt_kprintf("Not found LCD driver\n");
return RT_ERROR;
}
err = rt_device_open(device, RT_DEVICE_OFLAG_RDWR);
if (err != RT_EOK)
{
rt_kprintf("Open LCD driver fail\n");
return RT_ERROR;
}
/* set graphic device */
rtgui_graphic_set_device(device);
tid = rt_thread_create("mygui", tid = rt_thread_create("mygui",
rt_gui_demo_entry, RT_NULL, rt_gui_demo_entry, RT_NULL,

View File

@ -1,6 +1,3 @@
#ifndef __GUI_DEMO_H__
#define __GUI_DEMO_H__
const static unsigned char _picture_png[] = { const static unsigned char _picture_png[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52, 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52,
0x00,0x00,0x00,0xbe,0x00,0x00,0x00,0x4a,0x08,0x06,0x00,0x00,0x00,0x05,0x77,0xee, 0x00,0x00,0x00,0xbe,0x00,0x00,0x00,0x4a,0x08,0x06,0x00,0x00,0x00,0x05,0x77,0xee,
@ -1396,6 +1393,3 @@ const static unsigned char _picture_png[] = {
0x1f,0x00,0x4b,0xa8,0x7e,0x3f,0xd2,0x12,0x11,0x79,0x00,0x00,0x00,0x00,0x49,0x45, 0x1f,0x00,0x4b,0xa8,0x7e,0x3f,0xd2,0x12,0x11,0x79,0x00,0x00,0x00,0x00,0x49,0x45,
0x4e,0x44,0xae,0x42,0x60,0x82, 0x4e,0x44,0xae,0x42,0x60,0x82,
}; };
#endif