fix compiling warning.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@825 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
dda87fa816
commit
4b4a4f2003
@ -26,8 +26,8 @@ rt_bool_t dc_event_handler(rtgui_widget_t* widget, rtgui_event_t *event)
|
|||||||
{
|
{
|
||||||
struct rtgui_dc* dc;
|
struct rtgui_dc* dc;
|
||||||
rtgui_rect_t rect;
|
rtgui_rect_t rect;
|
||||||
rt_uint32_t vx[] = {20, 50, 60, 45, 60, 20};
|
const int vx[] = {20, 50, 60, 45, 60, 20};
|
||||||
rt_uint32_t vy[] = {150, 50, 90, 60, 45, 50};
|
const int vy[] = {150, 50, 90, 60, 45, 50};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 因为用的是demo view,上面本身有一部分控件,所以在绘图时先要让demo view
|
* 因为用的是demo view,上面本身有一部分控件,所以在绘图时先要让demo view
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "demo_view.h"
|
#include "demo_view.h"
|
||||||
#include <rtgui/widgets/button.h>
|
#include <rtgui/widgets/button.h>
|
||||||
#include <rtgui/widgets/filelist_view.h>
|
#include <rtgui/widgets/filelist_view.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
static rtgui_image_t* image = RT_NULL;
|
static rtgui_image_t* image = RT_NULL;
|
||||||
static rtgui_view_t* _view = RT_NULL;
|
static rtgui_view_t* _view = RT_NULL;
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <rtgui/widgets/label.h>
|
#include <rtgui/widgets/label.h>
|
||||||
#include <rtgui/widgets/button.h>
|
#include <rtgui/widgets/button.h>
|
||||||
#include "demo_view.h"
|
#include "demo_view.h"
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
static struct rtgui_timer *timer;
|
static struct rtgui_timer *timer;
|
||||||
static struct rtgui_label* label;
|
static struct rtgui_label* label;
|
||||||
@ -43,7 +44,7 @@ void window_demo_close(struct rtgui_widget* widget, rtgui_event_t *even)
|
|||||||
void diag_close(struct rtgui_timer* timer, void* parameter)
|
void diag_close(struct rtgui_timer* timer, void* parameter)
|
||||||
{
|
{
|
||||||
cnt --;
|
cnt --;
|
||||||
sprintf(label_text, "closed then %d second!", cnt);
|
rt_sprintf(label_text, "closed then %d second!", cnt);
|
||||||
|
|
||||||
/* 设置标签文本并更新控件 */
|
/* 设置标签文本并更新控件 */
|
||||||
rtgui_label_set_text(label, label_text);
|
rtgui_label_set_text(label, label_text);
|
||||||
@ -105,7 +106,7 @@ static void demo_autowin_onbutton(struct rtgui_widget* widget, rtgui_event_t* ev
|
|||||||
if (msgbox != RT_NULL)
|
if (msgbox != RT_NULL)
|
||||||
{
|
{
|
||||||
cnt = 5;
|
cnt = 5;
|
||||||
sprintf(label_text, "closed then %d second!", cnt);
|
rt_sprintf(label_text, "closed then %d second!", cnt);
|
||||||
label = rtgui_label_create(label_text);
|
label = rtgui_label_create(label_text);
|
||||||
rect.x1 += 5;
|
rect.x1 += 5;
|
||||||
rect.x2 -= 5;
|
rect.x2 -= 5;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user