update rtgui related project

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2177 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
dzzxzz@gmail.com 2012-06-19 00:48:11 +00:00
parent 4dd1acf294
commit 70e39ffa54
7 changed files with 95 additions and 129 deletions

View File

@ -76,6 +76,9 @@ void rt_init_thread_entry(void *parameter)
#ifdef RT_USING_RTGUI
{
extern void rtgui_system_server_init(void);
extern void application_init(void);
rt_device_t lcd;
/* init lcd */
@ -90,8 +93,11 @@ void rt_init_thread_entry(void *parameter)
/* set lcd device as rtgui graphic driver */
rtgui_graphic_set_device(lcd);
/* init rtgui system server */
rtgui_system_server_init();
/* startup rtgui in demo of RT-Thread/GUI examples */
rtgui_startup();
application_init();
}
}
#endif
@ -133,7 +139,7 @@ static void rt_thread_entry_led(void* parameter)
}
}
int rt_application_init()
int rt_application_init(void)
{
rt_thread_t tid;

View File

@ -61,6 +61,8 @@
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopU1X>0</nStopU1X>
<nStopU2X>0</nStopU2X>
</BeforeCompile>
<BeforeMake>
<RunUserProg1>0</RunUserProg1>
@ -431,11 +433,6 @@
<FileType>1</FileType>
<FilePath>drivers\drv_glcd.c</FilePath>
</File>
<File>
<FileName>key.c</FileName>
<FileType>1</FileType>
<FilePath>drivers\key.c</FilePath>
</File>
<File>
<FileName>lpc177x_8x_clkpwr.c</FileName>
<FileType>1</FileType>
@ -791,6 +788,11 @@
<FileType>1</FileType>
<FilePath>..\..\components\rtgui\common\pixel_driver.c</FilePath>
</File>
<File>
<FileName>rtgui_application.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\components\rtgui\server\rtgui_application.c</FilePath>
</File>
<File>
<FileName>driver.c</FileName>
<FileType>1</FileType>
@ -801,11 +803,6 @@
<FileType>1</FileType>
<FilePath>..\..\components\rtgui\server\mouse.c</FilePath>
</File>
<File>
<FileName>panel.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\components\rtgui\server\panel.c</FilePath>
</File>
<File>
<FileName>server.c</FileName>
<FileType>1</FileType>
@ -831,11 +828,6 @@
<FileType>1</FileType>
<FilePath>..\..\components\rtgui\widgets\checkbox.c</FilePath>
</File>
<File>
<FileName>container.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\components\rtgui\widgets\container.c</FilePath>
</File>
<File>
<FileName>combobox.c</FileName>
<FileType>1</FileType>
@ -917,9 +909,9 @@
<FilePath>..\..\components\rtgui\widgets\notebook.c</FilePath>
</File>
<File>
<FileName>view.c</FileName>
<FileName>container.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\components\rtgui\widgets\view.c</FilePath>
<FilePath>..\..\components\rtgui\widgets\container.c</FilePath>
</File>
<File>
<FileName>list_view.c</FileName>
@ -946,51 +938,41 @@
<FileType>1</FileType>
<FilePath>..\..\components\rtgui\widgets\window.c</FilePath>
</File>
<File>
<FileName>workbench.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\components\rtgui\widgets\workbench.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>gui_examples</GroupName>
<Files>
<File>
<FileName>demo_view_dc_buffer.c</FileName>
<FileName>demo_application.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_dc_buffer.c</FilePath>
</File>
<File>
<FileName>demo_view_instrument_panel.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_instrument_panel.c</FilePath>
</File>
<File>
<FileName>demo_fnview.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_fnview.c</FilePath>
</File>
<File>
<FileName>demo_listview.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_listview.c</FilePath>
</File>
<File>
<FileName>demo_listview_icon.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_listview_icon.c</FilePath>
</File>
<File>
<FileName>demo_panel_single.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_panel_single.c</FilePath>
<FilePath>..\..\examples\gui\demo_application.c</FilePath>
</File>
<File>
<FileName>demo_view.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view.c</FilePath>
</File>
<File>
<FileName>demo_view_benchmark.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_benchmark.c</FilePath>
</File>
<File>
<FileName>demo_view_dc.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_dc.c</FilePath>
</File>
<File>
<FileName>demo_view_ttf.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_ttf.c</FilePath>
</File>
<File>
<FileName>demo_view_dc_buffer.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_dc_buffer.c</FilePath>
</File>
<File>
<FileName>demo_view_animation.c</FileName>
<FileType>1</FileType>
@ -1002,9 +984,19 @@
<FilePath>..\..\examples\gui\demo_view_buffer_animation.c</FilePath>
</File>
<File>
<FileName>demo_view_box.c</FileName>
<FileName>demo_view_instrument_panel.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_box.c</FilePath>
<FilePath>..\..\examples\gui\demo_view_instrument_panel.c</FilePath>
</File>
<File>
<FileName>demo_view_window.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_window.c</FilePath>
</File>
<File>
<FileName>demo_view_label.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_label.c</FilePath>
</File>
<File>
<FileName>demo_view_button.c</FileName>
@ -1016,46 +1008,46 @@
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_checkbox.c</FilePath>
</File>
<File>
<FileName>demo_view_dc.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_dc.c</FilePath>
</File>
<File>
<FileName>demo_view_image.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_image.c</FilePath>
</File>
<File>
<FileName>demo_view_module.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_module.c</FilePath>
</File>
<File>
<FileName>demo_view_label.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_label.c</FilePath>
</File>
<File>
<FileName>demo_view_mywidget.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_mywidget.c</FilePath>
</File>
<File>
<FileName>demo_view_progressbar.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_progressbar.c</FilePath>
</File>
<File>
<FileName>demo_view_scrollbar.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_scrollbar.c</FilePath>
</File>
<File>
<FileName>demo_view_radiobox.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_radiobox.c</FilePath>
</File>
<File>
<FileName>demo_view_textbox.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_textbox.c</FilePath>
</File>
<File>
<FileName>demo_view_listbox.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_listbox.c</FilePath>
</File>
<File>
<FileName>demo_view_menu.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_menu.c</FilePath>
</File>
<File>
<FileName>demo_view_listctrl.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_listctrl.c</FilePath>
</File>
<File>
<FileName>demo_view_combobox.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_combobox.c</FilePath>
</File>
<File>
<FileName>demo_view_slider.c</FileName>
<FileType>1</FileType>
@ -1067,49 +1059,9 @@
<FilePath>..\..\examples\gui\demo_view_notebook.c</FilePath>
</File>
<File>
<FileName>demo_view_combobox.c</FileName>
<FileName>demo_view_mywidget.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_combobox.c</FilePath>
</File>
<File>
<FileName>demo_view_listctrl.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_listctrl.c</FilePath>
</File>
<File>
<FileName>demo_view_menu.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_menu.c</FilePath>
</File>
<File>
<FileName>demo_view_scrollbar.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_scrollbar.c</FilePath>
</File>
<File>
<FileName>demo_view_textbox.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_textbox.c</FilePath>
</File>
<File>
<FileName>demo_view_window.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_window.c</FilePath>
</File>
<File>
<FileName>demo_view_benchmark.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_view_benchmark.c</FilePath>
</File>
<File>
<FileName>demo_workbench.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\demo_workbench.c</FilePath>
</File>
<File>
<FileName>gui_init.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\examples\gui\gui_init.c</FilePath>
<FilePath>..\..\examples\gui\demo_view_mywidget.c</FilePath>
</File>
<File>
<FileName>mywidget.c</FileName>

View File

@ -1,7 +1,7 @@
/*
* File : application.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2009 - 2011, RT-Thread Development Team
* COPYRIGHT (C) 2009 - 2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@ -15,6 +15,7 @@
/**
* @addtogroup FM3
*/
/*@{*/
#include <rtthread.h>
@ -48,12 +49,17 @@ void rt_init_thread_entry(void *parameter)
rt_device_init_all();
#ifdef RT_USING_RTGUI
extern void rtgui_system_server_init(void);
/* find lcd device */
lcd = rt_device_find("lcd");
/* set lcd device as rtgui graphic driver */
rtgui_graphic_set_device(lcd);
/* init rtgui system server */
rtgui_system_server_init();
/* startup rtgui */
rtgui_startup();
#else
@ -127,7 +133,7 @@ void rt_init_thread_entry(void *parameter)
#endif
}
int rt_application_init()
int rt_application_init(void)
{
rt_thread_t init_thread;

View File

@ -139,6 +139,8 @@ void rt_init_thread_entry(void *parameter)
#ifdef RT_USING_RTGUI
{
extern void rtgui_system_server_init(void);
rt_device_t lcd;
/* init lcd */

View File

@ -126,7 +126,7 @@ void rt_init_thread_entry(void* parameter)
#ifdef RT_USING_RTGUI
{
extern void rtgui_startup();
extern void rtgui_system_server_init(void);
extern void rt_hw_lcd_init();
extern void rtgui_touch_hw_init(void);
@ -147,8 +147,8 @@ void rt_init_thread_entry(void* parameter)
/* set lcd device as rtgui graphic driver */
rtgui_graphic_set_device(lcd);
/* startup rtgui */
rtgui_startup();
/* init rtgui system server */
rtgui_system_server_init();
}
#endif /* #ifdef RT_USING_RTGUI */
}

View File

@ -26,7 +26,7 @@
#define RTGUI_MEM_TRACE
#endif
void rtgui_system_server_init()
void rtgui_system_server_init(void)
{
/* init image */
rtgui_system_image_init();

View File

@ -117,7 +117,7 @@ static void application_entry(void* parameter)
rtgui_application_destroy(app);
}
void application_init()
void application_init(void)
{
static rt_bool_t inited = RT_FALSE;
@ -138,7 +138,7 @@ void application_init()
#ifdef RT_USING_FINSH
#include <finsh.h>
void application()
void application(void)
{
application_init();
}