diff --git a/bsp/lpc178x/applications/application.c b/bsp/lpc178x/applications/application.c
index 03b5a8935..ccdee2629 100644
--- a/bsp/lpc178x/applications/application.c
+++ b/bsp/lpc178x/applications/application.c
@@ -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;
diff --git a/bsp/lpc178x/project.uvproj b/bsp/lpc178x/project.uvproj
index ce7ca17a6..2e846deee 100644
--- a/bsp/lpc178x/project.uvproj
+++ b/bsp/lpc178x/project.uvproj
@@ -61,6 +61,8 @@
0
0
+ 0
+ 0
0
@@ -431,11 +433,6 @@
1
drivers\drv_glcd.c
-
- key.c
- 1
- drivers\key.c
-
lpc177x_8x_clkpwr.c
1
@@ -791,6 +788,11 @@
1
..\..\components\rtgui\common\pixel_driver.c
+
+ rtgui_application.c
+ 1
+ ..\..\components\rtgui\server\rtgui_application.c
+
driver.c
1
@@ -801,11 +803,6 @@
1
..\..\components\rtgui\server\mouse.c
-
- panel.c
- 1
- ..\..\components\rtgui\server\panel.c
-
server.c
1
@@ -831,11 +828,6 @@
1
..\..\components\rtgui\widgets\checkbox.c
-
- container.c
- 1
- ..\..\components\rtgui\widgets\container.c
-
combobox.c
1
@@ -917,9 +909,9 @@
..\..\components\rtgui\widgets\notebook.c
- view.c
+ container.c
1
- ..\..\components\rtgui\widgets\view.c
+ ..\..\components\rtgui\widgets\container.c
list_view.c
@@ -946,51 +938,41 @@
1
..\..\components\rtgui\widgets\window.c
-
- workbench.c
- 1
- ..\..\components\rtgui\widgets\workbench.c
-
gui_examples
- demo_view_dc_buffer.c
+ demo_application.c
1
- ..\..\examples\gui\demo_view_dc_buffer.c
-
-
- demo_view_instrument_panel.c
- 1
- ..\..\examples\gui\demo_view_instrument_panel.c
-
-
- demo_fnview.c
- 1
- ..\..\examples\gui\demo_fnview.c
-
-
- demo_listview.c
- 1
- ..\..\examples\gui\demo_listview.c
-
-
- demo_listview_icon.c
- 1
- ..\..\examples\gui\demo_listview_icon.c
-
-
- demo_panel_single.c
- 1
- ..\..\examples\gui\demo_panel_single.c
+ ..\..\examples\gui\demo_application.c
demo_view.c
1
..\..\examples\gui\demo_view.c
+
+ demo_view_benchmark.c
+ 1
+ ..\..\examples\gui\demo_view_benchmark.c
+
+
+ demo_view_dc.c
+ 1
+ ..\..\examples\gui\demo_view_dc.c
+
+
+ demo_view_ttf.c
+ 1
+ ..\..\examples\gui\demo_view_ttf.c
+
+
+ demo_view_dc_buffer.c
+ 1
+ ..\..\examples\gui\demo_view_dc_buffer.c
+
demo_view_animation.c
1
@@ -1002,9 +984,19 @@
..\..\examples\gui\demo_view_buffer_animation.c
- demo_view_box.c
+ demo_view_instrument_panel.c
1
- ..\..\examples\gui\demo_view_box.c
+ ..\..\examples\gui\demo_view_instrument_panel.c
+
+
+ demo_view_window.c
+ 1
+ ..\..\examples\gui\demo_view_window.c
+
+
+ demo_view_label.c
+ 1
+ ..\..\examples\gui\demo_view_label.c
demo_view_button.c
@@ -1016,46 +1008,46 @@
1
..\..\examples\gui\demo_view_checkbox.c
-
- demo_view_dc.c
- 1
- ..\..\examples\gui\demo_view_dc.c
-
-
- demo_view_image.c
- 1
- ..\..\examples\gui\demo_view_image.c
-
-
- demo_view_module.c
- 1
- ..\..\examples\gui\demo_view_module.c
-
-
- demo_view_label.c
- 1
- ..\..\examples\gui\demo_view_label.c
-
-
- demo_view_mywidget.c
- 1
- ..\..\examples\gui\demo_view_mywidget.c
-
demo_view_progressbar.c
1
..\..\examples\gui\demo_view_progressbar.c
+
+ demo_view_scrollbar.c
+ 1
+ ..\..\examples\gui\demo_view_scrollbar.c
+
demo_view_radiobox.c
1
..\..\examples\gui\demo_view_radiobox.c
+
+ demo_view_textbox.c
+ 1
+ ..\..\examples\gui\demo_view_textbox.c
+
demo_view_listbox.c
1
..\..\examples\gui\demo_view_listbox.c
+
+ demo_view_menu.c
+ 1
+ ..\..\examples\gui\demo_view_menu.c
+
+
+ demo_view_listctrl.c
+ 1
+ ..\..\examples\gui\demo_view_listctrl.c
+
+
+ demo_view_combobox.c
+ 1
+ ..\..\examples\gui\demo_view_combobox.c
+
demo_view_slider.c
1
@@ -1067,49 +1059,9 @@
..\..\examples\gui\demo_view_notebook.c
- demo_view_combobox.c
+ demo_view_mywidget.c
1
- ..\..\examples\gui\demo_view_combobox.c
-
-
- demo_view_listctrl.c
- 1
- ..\..\examples\gui\demo_view_listctrl.c
-
-
- demo_view_menu.c
- 1
- ..\..\examples\gui\demo_view_menu.c
-
-
- demo_view_scrollbar.c
- 1
- ..\..\examples\gui\demo_view_scrollbar.c
-
-
- demo_view_textbox.c
- 1
- ..\..\examples\gui\demo_view_textbox.c
-
-
- demo_view_window.c
- 1
- ..\..\examples\gui\demo_view_window.c
-
-
- demo_view_benchmark.c
- 1
- ..\..\examples\gui\demo_view_benchmark.c
-
-
- demo_workbench.c
- 1
- ..\..\examples\gui\demo_workbench.c
-
-
- gui_init.c
- 1
- ..\..\examples\gui\gui_init.c
+ ..\..\examples\gui\demo_view_mywidget.c
mywidget.c
diff --git a/bsp/mb9bf500r/application.c b/bsp/mb9bf500r/application.c
index 2c3e4dab1..46c3bc207 100644
--- a/bsp/mb9bf500r/application.c
+++ b/bsp/mb9bf500r/application.c
@@ -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
@@ -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;
diff --git a/bsp/mini2440/application.c b/bsp/mini2440/application.c
index be1f551f6..2306aa8a2 100644
--- a/bsp/mini2440/application.c
+++ b/bsp/mini2440/application.c
@@ -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 */
diff --git a/bsp/stm32f10x/application.c b/bsp/stm32f10x/application.c
index d8185f23e..1c773da68 100644
--- a/bsp/stm32f10x/application.c
+++ b/bsp/stm32f10x/application.c
@@ -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 */
}
diff --git a/components/rtgui/common/rtgui_system.c b/components/rtgui/common/rtgui_system.c
index a503e946b..b84089313 100644
--- a/components/rtgui/common/rtgui_system.c
+++ b/components/rtgui/common/rtgui_system.c
@@ -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();
diff --git a/examples/gui/demo_application.c b/examples/gui/demo_application.c
index 00ffce982..c46d271a7 100644
--- a/examples/gui/demo_application.c
+++ b/examples/gui/demo_application.c
@@ -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
-void application()
+void application(void)
{
application_init();
}