diff --git a/bsp/efm32/application.c b/bsp/efm32/application.c index 1c7831366b..ce34458cf1 100644 --- a/bsp/efm32/application.c +++ b/bsp/efm32/application.c @@ -60,7 +60,7 @@ #include #include -#include +#include #include #include #include @@ -172,8 +172,8 @@ static void app_main(void *parameter) rt_kprintf("LCD size: %dX%d\n", lcd_info.width, lcd_info.height); /* create application */ - struct rtgui_application *app; - app = rtgui_application_create(rt_thread_self(), "gui_app"); + struct rtgui_app *app; + app = rtgui_app_create(rt_thread_self(), "gui_app"); if (app == RT_NULL) { rt_kprintf("Create application \"gui_app\" failed!\n"); @@ -199,7 +199,7 @@ static void app_main(void *parameter) if (win_info == RT_NULL) { rt_kprintf("Create window \"info\" failed!\n"); - rtgui_application_destroy(app); + rtgui_app_destroy(app); return; } @@ -240,7 +240,7 @@ static void app_main(void *parameter) if (win_main == RT_NULL) { rt_kprintf("Create window \"main\" failed!\n"); - rtgui_application_destroy(app); + rtgui_app_destroy(app); return; } @@ -286,7 +286,7 @@ static void app_main(void *parameter) if (win_hello == RT_NULL) { rt_kprintf("Create window \"hello\" failed!\n"); - rtgui_application_destroy(app); + rtgui_app_destroy(app); return; } @@ -297,7 +297,7 @@ static void app_main(void *parameter) rt_kprintf("Create box failed!\n"); return; } - rtgui_win_set_box(win_hello, box); +// rtgui_win_set_box(win_hello, box); label = rtgui_label_create("哈罗,盹胖!"); if(label == RT_NULL) @@ -318,8 +318,8 @@ static void app_main(void *parameter) rtgui_win_show(win_main, RT_FALSE); rtgui_win_show(win_hello, RT_FALSE); - rtgui_application_run(app); - rtgui_application_destroy(app); + rtgui_app_run(app); + rtgui_app_destroy(app); } static rt_bool_t photo_view_event_handler(rtgui_object_t *object, rtgui_event_t *event) @@ -402,8 +402,8 @@ static void app_photo(void *parameter) rt_kprintf("LCD size: %dX%d\n", lcd_info.width, lcd_info.height); /* create application */ - struct rtgui_application *app; - app = rtgui_application_create(rt_thread_self(), "pho_app"); + struct rtgui_app *app; + app = rtgui_app_create(rt_thread_self(), "pho_app"); if (app == RT_NULL) { rt_kprintf("Create application \"pho_app\" failed!\n"); @@ -424,7 +424,7 @@ static void app_photo(void *parameter) if (window == RT_NULL) { rt_kprintf("Create window \"photo\" failed!\n"); - rtgui_application_destroy(app); + rtgui_app_destroy(app); return; } event->win.wid = window; @@ -462,8 +462,8 @@ static void app_photo(void *parameter) rtgui_win_show(window, RT_FALSE); - rtgui_application_run(app); - rtgui_application_destroy(app); + rtgui_app_run(app); + rtgui_app_destroy(app); } #endif @@ -680,7 +680,7 @@ void rt_demo_thread_entry(void* parameter) continue; } - rtgui_application_send(photo_app, &event.win.parent, sizeof(event)); + rtgui_send(photo_app, &event.win.parent, sizeof(event)); rt_thread_sleep(2000); } while (dirent != RT_NULL); closedir(dir); diff --git a/bsp/mini2440/calibration.c b/bsp/mini2440/calibration.c index 764be50997..0911f8aecd 100644 --- a/bsp/mini2440/calibration.c +++ b/bsp/mini2440/calibration.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include "touch.h" @@ -111,7 +111,7 @@ static void calibration_data_post(rt_uint16_t x, rt_uint16_t y) calibration_ptr->data.max_x, calibration_ptr->data.min_y, calibration_ptr->data.max_y); - rtgui_application_send(calibration_ptr->tid, &ecmd.parent, sizeof(struct rtgui_event_command)); + rtgui_send(calibration_ptr->tid, &ecmd.parent, sizeof(struct rtgui_event_command)); } return; } @@ -125,7 +125,7 @@ static void calibration_data_post(rt_uint16_t x, rt_uint16_t y) ecmd.command_id = TOUCH_WIN_UPDATE; ecmd.wid = calibration_ptr->wid; - rtgui_application_send(calibration_ptr->tid, &ecmd.parent, sizeof(struct rtgui_event_command)); + rtgui_send(calibration_ptr->tid, &ecmd.parent, sizeof(struct rtgui_event_command)); } } } @@ -226,11 +226,11 @@ rt_bool_t calibration_event_handler(struct rtgui_object *object, struct rtgui_ev void calibration_entry(void *parameter) { - struct rtgui_application *app; + struct rtgui_app *app; struct rtgui_win *win; struct rtgui_rect rect; - app = rtgui_application_create(rt_thread_self(), "cali"); + app = rtgui_app_create(rt_thread_self(), "cali"); if (app == RT_NULL) return; @@ -245,7 +245,7 @@ void calibration_entry(void *parameter) "calibration", &rect, RTGUI_WIN_STYLE_NO_TITLE | RTGUI_WIN_STYLE_NO_BORDER); if (win == RT_NULL) { - rtgui_application_destroy(app); + rtgui_app_destroy(app); return; } @@ -256,7 +256,7 @@ void calibration_entry(void *parameter) rtgui_win_show(win, RT_TRUE); rtgui_win_destroy(win); - rtgui_application_destroy(app); + rtgui_app_destroy(app); /* set calibration data */ rt_device_control(calibration_ptr->device, RT_TOUCH_CALIBRATION_DATA, &calibration_ptr->data); diff --git a/examples/gui/demo_listview.c b/examples/gui/demo_listview.c index d1c00b1edb..28b9e84afe 100644 --- a/examples/gui/demo_listview.c +++ b/examples/gui/demo_listview.c @@ -10,7 +10,7 @@ #include #include -static struct rtgui_application *application = RT_NULL; +static struct rtgui_app *application = RT_NULL; static rtgui_list_view_t* _view = RT_NULL; // static rtgui_image_t* return_image = RT_NULL; diff --git a/examples/gui/demo_listview_icon.c b/examples/gui/demo_listview_icon.c index 9723059ce2..e957e470d9 100644 --- a/examples/gui/demo_listview_icon.c +++ b/examples/gui/demo_listview_icon.c @@ -10,7 +10,7 @@ #include #include -static struct rtgui_application *application = RT_NULL; +static struct rtgui_app *application = RT_NULL; static rtgui_list_view_t* _view = RT_NULL; /* 列表项的动作函数 */ @@ -316,7 +316,7 @@ static void open_btn_onbutton(rtgui_widget_t* widget, struct rtgui_event* event) } /* 创建用于演示列表视图的视图 */ -rtgui_container_t* demo_listview_icon_view(struct rtgui_application *app) +rtgui_container_t* demo_listview_icon_view(struct rtgui_app *app) { rtgui_rect_t rect; rtgui_container_t *view;