提交 ffc3f02f 编写于 作者: B bernard.xiong@gmail.com

compatible with 0.3.x branch.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@872 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 63917c72
......@@ -12,10 +12,14 @@
static rtgui_workbench_t* workbench = 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;
/* 列表项的动作函数 */
#if RT_VERSION == 4
static void listitem_action(rtgui_widget_t *widget, void* parameter)
#else
static void listitem_action(void* parameter)
#endif
{
char label_text[32];
rtgui_win_t *win;
......@@ -46,7 +50,11 @@ static void listitem_action(rtgui_widget_t *widget, void* parameter)
}
/* 返回功能的动作函数 */
#if RT_VERSION == 4
static void return_action(rtgui_widget_t* widget, void* parameter)
#else
static void return_action(void* parameter)
#endif
{
rtgui_view_end_modal(RTGUI_VIEW(_view), RTGUI_MODAL_OK);
}
......
......@@ -14,7 +14,11 @@ static rtgui_workbench_t* workbench = RT_NULL;
static rtgui_list_view_t* _view = RT_NULL;
/* 列表项的动作函数 */
#if RT_VERSION == 4
static void listitem_action(rtgui_widget_t* widget, void* parameter)
#else
static void listitem_action(void* parameter)
#endif
{
char label_text[32];
rtgui_win_t *win;
......@@ -45,7 +49,11 @@ static void listitem_action(rtgui_widget_t* widget, void* parameter)
}
/* 返回功能的动作函数 */
#if RT_VERSION == 4
static void return_action(rtgui_widget_t* widget, void* parameter)
#else
static void return_action(void* parameter)
#endif
{
/* 退出模态显示 */
rtgui_view_end_modal(RTGUI_VIEW(_view), RTGUI_MODAL_OK);
......
......@@ -117,7 +117,7 @@ rtgui_view_t *demo_view_buffer_animation(rtgui_workbench_t* workbench)
}
/* 启动定时器以触发动画 */
timer = rtgui_timer_create(2, RT_TIMER_FLAG_PERIODIC, timeout, (void*)view);
timer = rtgui_timer_create(1, RT_TIMER_FLAG_PERIODIC, timeout, (void*)view);
rtgui_timer_start(timer);
return view;
......
......@@ -51,11 +51,17 @@ static void workbench_entry(void* parameter)
rtgui_widget_set_event_handler(RTGUI_WIDGET(workbench), demo_workbench_event_handler);
/* 初始化各个例子的视图 */
#if RT_VERSION == 4
demo_view_benchmark(workbench);
#endif
demo_view_dc(workbench);
#if RT_VERSION == 4
#ifdef RTGUI_USING_TTF
demo_view_ttf(workbench);
#endif
#endif
demo_view_dc_buffer(workbench);
demo_view_animation(workbench);
demo_view_buffer_animation(workbench);
......@@ -64,7 +70,9 @@ static void workbench_entry(void* parameter)
demo_view_button(workbench);
demo_view_checkbox(workbench);
demo_view_progressbar(workbench);
#if RT_VERSION == 4
demo_view_scrollbar(workbench);
#endif
demo_view_radiobox(workbench);
demo_view_textbox(workbench);
demo_view_listbox(workbench);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册