fixed compiling errors while rtgui sync with github

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2235 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
dzzxzz@gmail.com 2012-07-26 08:06:15 +00:00
parent 08e05eb3b4
commit cb9cfb3100
4 changed files with 25 additions and 25 deletions

View File

@ -60,7 +60,7 @@
#include <rtgui/rtgui_server.h> #include <rtgui/rtgui_server.h>
#include <rtgui/rtgui_system.h> #include <rtgui/rtgui_system.h>
#include <rtgui/rtgui_application.h> #include <rtgui/rtgui_app.h>
#include <rtgui/widgets/widget.h> #include <rtgui/widgets/widget.h>
#include <rtgui/widgets/label.h> #include <rtgui/widgets/label.h>
#include <rtgui/widgets/window.h> #include <rtgui/widgets/window.h>
@ -172,8 +172,8 @@ static void app_main(void *parameter)
rt_kprintf("LCD size: %dX%d\n", lcd_info.width, lcd_info.height); rt_kprintf("LCD size: %dX%d\n", lcd_info.width, lcd_info.height);
/* create application */ /* create application */
struct rtgui_application *app; struct rtgui_app *app;
app = rtgui_application_create(rt_thread_self(), "gui_app"); app = rtgui_app_create(rt_thread_self(), "gui_app");
if (app == RT_NULL) if (app == RT_NULL)
{ {
rt_kprintf("Create application \"gui_app\" failed!\n"); rt_kprintf("Create application \"gui_app\" failed!\n");
@ -199,7 +199,7 @@ static void app_main(void *parameter)
if (win_info == RT_NULL) if (win_info == RT_NULL)
{ {
rt_kprintf("Create window \"info\" failed!\n"); rt_kprintf("Create window \"info\" failed!\n");
rtgui_application_destroy(app); rtgui_app_destroy(app);
return; return;
} }
@ -240,7 +240,7 @@ static void app_main(void *parameter)
if (win_main == RT_NULL) if (win_main == RT_NULL)
{ {
rt_kprintf("Create window \"main\" failed!\n"); rt_kprintf("Create window \"main\" failed!\n");
rtgui_application_destroy(app); rtgui_app_destroy(app);
return; return;
} }
@ -286,7 +286,7 @@ static void app_main(void *parameter)
if (win_hello == RT_NULL) if (win_hello == RT_NULL)
{ {
rt_kprintf("Create window \"hello\" failed!\n"); rt_kprintf("Create window \"hello\" failed!\n");
rtgui_application_destroy(app); rtgui_app_destroy(app);
return; return;
} }
@ -297,7 +297,7 @@ static void app_main(void *parameter)
rt_kprintf("Create box failed!\n"); rt_kprintf("Create box failed!\n");
return; return;
} }
rtgui_win_set_box(win_hello, box); // rtgui_win_set_box(win_hello, box);
label = rtgui_label_create("¹þÂÞ,íïÅÖ!"); label = rtgui_label_create("¹þÂÞ,íïÅÖ!");
if(label == RT_NULL) 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_main, RT_FALSE);
rtgui_win_show(win_hello, RT_FALSE); rtgui_win_show(win_hello, RT_FALSE);
rtgui_application_run(app); rtgui_app_run(app);
rtgui_application_destroy(app); rtgui_app_destroy(app);
} }
static rt_bool_t photo_view_event_handler(rtgui_object_t *object, rtgui_event_t *event) 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); rt_kprintf("LCD size: %dX%d\n", lcd_info.width, lcd_info.height);
/* create application */ /* create application */
struct rtgui_application *app; struct rtgui_app *app;
app = rtgui_application_create(rt_thread_self(), "pho_app"); app = rtgui_app_create(rt_thread_self(), "pho_app");
if (app == RT_NULL) if (app == RT_NULL)
{ {
rt_kprintf("Create application \"pho_app\" failed!\n"); rt_kprintf("Create application \"pho_app\" failed!\n");
@ -424,7 +424,7 @@ static void app_photo(void *parameter)
if (window == RT_NULL) if (window == RT_NULL)
{ {
rt_kprintf("Create window \"photo\" failed!\n"); rt_kprintf("Create window \"photo\" failed!\n");
rtgui_application_destroy(app); rtgui_app_destroy(app);
return; return;
} }
event->win.wid = window; event->win.wid = window;
@ -462,8 +462,8 @@ static void app_photo(void *parameter)
rtgui_win_show(window, RT_FALSE); rtgui_win_show(window, RT_FALSE);
rtgui_application_run(app); rtgui_app_run(app);
rtgui_application_destroy(app); rtgui_app_destroy(app);
} }
#endif #endif
@ -680,7 +680,7 @@ void rt_demo_thread_entry(void* parameter)
continue; continue;
} }
rtgui_application_send(photo_app, &event.win.parent, sizeof(event)); rtgui_send(photo_app, &event.win.parent, sizeof(event));
rt_thread_sleep(2000); rt_thread_sleep(2000);
} while (dirent != RT_NULL); } while (dirent != RT_NULL);
closedir(dir); closedir(dir);

View File

@ -2,7 +2,7 @@
#include <rtgui/dc.h> #include <rtgui/dc.h>
#include <rtgui/rtgui_system.h> #include <rtgui/rtgui_system.h>
#include <rtgui/widgets/window.h> #include <rtgui/widgets/window.h>
#include <rtgui/rtgui_application.h> #include <rtgui/rtgui_app.h>
#include "touch.h" #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.max_x,
calibration_ptr->data.min_y, calibration_ptr->data.min_y,
calibration_ptr->data.max_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; 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.command_id = TOUCH_WIN_UPDATE;
ecmd.wid = calibration_ptr->wid; 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) void calibration_entry(void *parameter)
{ {
struct rtgui_application *app; struct rtgui_app *app;
struct rtgui_win *win; struct rtgui_win *win;
struct rtgui_rect rect; struct rtgui_rect rect;
app = rtgui_application_create(rt_thread_self(), "cali"); app = rtgui_app_create(rt_thread_self(), "cali");
if (app == RT_NULL) if (app == RT_NULL)
return; return;
@ -245,7 +245,7 @@ void calibration_entry(void *parameter)
"calibration", &rect, RTGUI_WIN_STYLE_NO_TITLE | RTGUI_WIN_STYLE_NO_BORDER); "calibration", &rect, RTGUI_WIN_STYLE_NO_TITLE | RTGUI_WIN_STYLE_NO_BORDER);
if (win == RT_NULL) if (win == RT_NULL)
{ {
rtgui_application_destroy(app); rtgui_app_destroy(app);
return; return;
} }
@ -256,7 +256,7 @@ void calibration_entry(void *parameter)
rtgui_win_show(win, RT_TRUE); rtgui_win_show(win, RT_TRUE);
rtgui_win_destroy(win); rtgui_win_destroy(win);
rtgui_application_destroy(app); rtgui_app_destroy(app);
/* set calibration data */ /* set calibration data */
rt_device_control(calibration_ptr->device, RT_TOUCH_CALIBRATION_DATA, &calibration_ptr->data); rt_device_control(calibration_ptr->device, RT_TOUCH_CALIBRATION_DATA, &calibration_ptr->data);

View File

@ -10,7 +10,7 @@
#include <rtgui/widgets/window.h> #include <rtgui/widgets/window.h>
#include <rtgui/widgets/list_view.h> #include <rtgui/widgets/list_view.h>
static struct rtgui_application *application = RT_NULL; static struct rtgui_app *application = RT_NULL;
static rtgui_list_view_t* _view = RT_NULL; static rtgui_list_view_t* _view = RT_NULL;
// static rtgui_image_t* return_image = RT_NULL; // static rtgui_image_t* return_image = RT_NULL;

View File

@ -10,7 +10,7 @@
#include <rtgui/widgets/window.h> #include <rtgui/widgets/window.h>
#include <rtgui/widgets/list_view.h> #include <rtgui/widgets/list_view.h>
static struct rtgui_application *application = RT_NULL; static struct rtgui_app *application = RT_NULL;
static rtgui_list_view_t* _view = 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_rect_t rect;
rtgui_container_t *view; rtgui_container_t *view;