fix compiling warning.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@969 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong@gmail.com 2010-09-27 15:51:38 +00:00
parent c8a48b5d23
commit 98dc2877a5
7 changed files with 73 additions and 73 deletions

View File

@ -49,7 +49,6 @@ static void rtgui_blit_line_1_2(rt_uint8_t* dst_ptr, rt_uint8_t* src_ptr, int li
static void rtgui_blit_line_3_2(rt_uint8_t* dst_ptr, rt_uint8_t* src_ptr, int line) static void rtgui_blit_line_3_2(rt_uint8_t* dst_ptr, rt_uint8_t* src_ptr, int line)
{ {
rt_uint16_t* dst; rt_uint16_t* dst;
rt_uint32_t* src;
dst = (rt_uint16_t*)dst_ptr; dst = (rt_uint16_t*)dst_ptr;
line = line / 3; line = line / 3;
@ -299,7 +298,7 @@ static const rtgui_blit_line_func _blit_table[5][5] =
{RT_NULL, rtgui_blit_line_1_4, rtgui_blit_line_2_4, rtgui_blit_line_3_4, rtgui_blit_line_direct }, {RT_NULL, rtgui_blit_line_1_4, rtgui_blit_line_2_4, rtgui_blit_line_3_4, rtgui_blit_line_direct },
}; };
const rtgui_blit_line_func rtgui_blit_line_get(int dst_bpp, int src_bpp) rtgui_blit_line_func rtgui_blit_line_get(int dst_bpp, int src_bpp)
{ {
RT_ASSERT(dst_bpp>0 && dst_bpp < 5); RT_ASSERT(dst_bpp>0 && dst_bpp < 5);
RT_ASSERT(src_bpp>0 && src_bpp < 5); RT_ASSERT(src_bpp>0 && src_bpp < 5);

View File

@ -180,7 +180,8 @@ void rtgui_dc_draw_round_rect(struct rtgui_dc* dc, struct rtgui_rect* rect, int
if(r == 0) if(r == 0)
{ {
return rtgui_dc_draw_rect(dc, rect); rtgui_dc_draw_rect(dc, rect);
return;
} }
if(((rect->x2 - rect->x1)/2 >= r)&&((rect->y2-rect->y1)/2 >= r)) if(((rect->x2 - rect->x1)/2 >= r)&&((rect->y2-rect->y1)/2 >= r))
@ -981,7 +982,6 @@ void rtgui_dc_fill_sector(struct rtgui_dc *dc, rt_int16_t x, rt_int16_t y, rt_in
{ {
int start_x, start_y; int start_x, start_y;
int end_x, end_y; int end_x, end_y;
float start_f;
/* Sanity check radius */ /* Sanity check radius */
if (r < 0) return ; if (r < 0) return ;

View File

@ -216,7 +216,6 @@ static void rtgui_dc_buffer_fill_rect (struct rtgui_dc* self, struct rtgui_rect*
static void rtgui_dc_buffer_blit(struct rtgui_dc* self, struct rtgui_point* dc_point, struct rtgui_dc* dest, rtgui_rect_t* rect) static void rtgui_dc_buffer_blit(struct rtgui_dc* self, struct rtgui_point* dc_point, struct rtgui_dc* dest, rtgui_rect_t* rect)
{ {
struct rtgui_dc_buffer* dc = (struct rtgui_dc_buffer*)self; struct rtgui_dc_buffer* dc = (struct rtgui_dc_buffer*)self;
struct rtgui_dc* hw = dest;
if (dc_point == RT_NULL) dc_point = &rtgui_empty_point; if (dc_point == RT_NULL) dc_point = &rtgui_empty_point;
if (rtgui_dc_get_visible(dest) == RT_FALSE) return; if (rtgui_dc_get_visible(dest) == RT_FALSE) return;

View File

@ -4,6 +4,6 @@
#include <rtgui/rtgui.h> #include <rtgui/rtgui.h>
typedef void (*rtgui_blit_line_func)(rt_uint8_t* dst, rt_uint8_t* src, int line); typedef void (*rtgui_blit_line_func)(rt_uint8_t* dst, rt_uint8_t* src, int line);
const rtgui_blit_line_func rtgui_blit_line_get(int dst_bpp, int src_bpp); rtgui_blit_line_func rtgui_blit_line_get(int dst_bpp, int src_bpp);
#endif #endif

View File

@ -70,7 +70,7 @@ void rtgui_timer_stop (rtgui_timer_t* timer);
rtgui_thread_t* rtgui_thread_register(rt_thread_t tid, rt_mq_t mq); rtgui_thread_t* rtgui_thread_register(rt_thread_t tid, rt_mq_t mq);
void rtgui_thread_deregister(rt_thread_t tid); void rtgui_thread_deregister(rt_thread_t tid);
void rtgui_thread_set_onidle(rtgui_idle_func onidle); void rtgui_thread_set_onidle(rtgui_idle_func onidle);
rtgui_idle_func rtgui_thread_get_onidle(); rtgui_idle_func rtgui_thread_get_onidle(void);
rtgui_thread_t* rtgui_thread_self(void); rtgui_thread_t* rtgui_thread_self(void);
rt_thread_t rtgui_thread_get_server(void); rt_thread_t rtgui_thread_get_server(void);

View File

@ -47,6 +47,7 @@ void rtgui_theme_draw_textbox(rtgui_textbox_t* box);
void rtgui_theme_draw_iconbox(rtgui_iconbox_t* iconbox); void rtgui_theme_draw_iconbox(rtgui_iconbox_t* iconbox);
void rtgui_theme_draw_checkbox(rtgui_checkbox_t* checkbox); void rtgui_theme_draw_checkbox(rtgui_checkbox_t* checkbox);
void rtgui_theme_draw_radiobutton(struct rtgui_radiobox* radiobox, rt_uint16_t item); void rtgui_theme_draw_radiobutton(struct rtgui_radiobox* radiobox, rt_uint16_t item);
void rtgui_theme_draw_radiobox(struct rtgui_radiobox* radiobox); void rtgui_theme_draw_radiobox(struct rtgui_radiobox* radiobox);
void rtgui_theme_draw_slider(struct rtgui_slider* slider); void rtgui_theme_draw_slider(struct rtgui_slider* slider);
void rtgui_theme_draw_scrollbar(struct rtgui_scrollbar* bar); void rtgui_theme_draw_scrollbar(struct rtgui_scrollbar* bar);

View File

@ -12,6 +12,7 @@
* 2010-08-09 Bernard first version * 2010-08-09 Bernard first version
*/ */
#include <rtgui/dc.h> #include <rtgui/dc.h>
#include <rtgui/rtgui_theme.h>
#include <rtgui/widgets/scrollbar.h> #include <rtgui/widgets/scrollbar.h>
static void _rtgui_scrollbar_constructor(rtgui_scrollbar_t *bar) static void _rtgui_scrollbar_constructor(rtgui_scrollbar_t *bar)
@ -103,7 +104,7 @@ rtgui_type_t *rtgui_scrollbar_type_get(void)
static void _rtgui_scrollbar_on_mouseclick(struct rtgui_widget * widget, struct rtgui_event * event) static void _rtgui_scrollbar_on_mouseclick(struct rtgui_widget * widget, struct rtgui_event * event)
{ {
rtgui_rect_t rect, btn_rect, bar_rect; rtgui_rect_t btn_rect, bar_rect;
rt_uint32_t thumb_size, thumb_position; rt_uint32_t thumb_size, thumb_position;
struct rtgui_scrollbar* bar = (struct rtgui_scrollbar*)widget; struct rtgui_scrollbar* bar = (struct rtgui_scrollbar*)widget;
struct rtgui_event_mouse* mouse = (struct rtgui_event_mouse*)event; struct rtgui_event_mouse* mouse = (struct rtgui_event_mouse*)event;