fix compiling warning.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@969 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
c8a48b5d23
commit
98dc2877a5
@ -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);
|
||||||
|
@ -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 ;
|
||||||
|
@ -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;
|
||||||
|
@ -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
|
||||||
|
@ -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);
|
||||||
|
@ -1,66 +1,67 @@
|
|||||||
/*
|
/*
|
||||||
* File : rtgui_theme.h
|
* File : rtgui_theme.h
|
||||||
* This file is part of RTGUI in RT-Thread RTOS
|
* This file is part of RTGUI in RT-Thread RTOS
|
||||||
* COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
|
* COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
* found in the file LICENSE in this distribution or at
|
* found in the file LICENSE in this distribution or at
|
||||||
* http://www.rt-thread.org/license/LICENSE
|
* http://www.rt-thread.org/license/LICENSE
|
||||||
*
|
*
|
||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2009-10-04 Bernard first version
|
* 2009-10-04 Bernard first version
|
||||||
*/
|
*/
|
||||||
#ifndef __RTGUI_THEME_H__
|
#ifndef __RTGUI_THEME_H__
|
||||||
#define __RTGUI_THEME_H__
|
#define __RTGUI_THEME_H__
|
||||||
|
|
||||||
#include <rtgui/rtgui.h>
|
#include <rtgui/rtgui.h>
|
||||||
#include <rtgui/rtgui_server.h>
|
#include <rtgui/rtgui_server.h>
|
||||||
|
|
||||||
#define CHECK_BOX_W 13
|
#define CHECK_BOX_W 13
|
||||||
#define CHECK_BOX_H 13
|
#define CHECK_BOX_H 13
|
||||||
|
|
||||||
#define RADIO_BOX_W 12
|
#define RADIO_BOX_W 12
|
||||||
#define RADIO_BOX_H 12
|
#define RADIO_BOX_H 12
|
||||||
|
|
||||||
#include <rtgui/widgets/label.h>
|
#include <rtgui/widgets/label.h>
|
||||||
#include <rtgui/widgets/button.h>
|
#include <rtgui/widgets/button.h>
|
||||||
#include <rtgui/widgets/textbox.h>
|
#include <rtgui/widgets/textbox.h>
|
||||||
#include <rtgui/widgets/iconbox.h>
|
#include <rtgui/widgets/iconbox.h>
|
||||||
#include <rtgui/widgets/checkbox.h>
|
#include <rtgui/widgets/checkbox.h>
|
||||||
#include <rtgui/widgets/radiobox.h>
|
#include <rtgui/widgets/radiobox.h>
|
||||||
#include <rtgui/widgets/slider.h>
|
#include <rtgui/widgets/slider.h>
|
||||||
#include <rtgui/widgets/scrollbar.h>
|
#include <rtgui/widgets/scrollbar.h>
|
||||||
#include <rtgui/widgets/progressbar.h>
|
#include <rtgui/widgets/progressbar.h>
|
||||||
#include <rtgui/widgets/staticline.h>
|
#include <rtgui/widgets/staticline.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void rtgui_system_theme_init(void);
|
void rtgui_system_theme_init(void);
|
||||||
|
|
||||||
void rtgui_theme_draw_win(struct rtgui_topwin* win);
|
void rtgui_theme_draw_win(struct rtgui_topwin* win);
|
||||||
void rtgui_theme_draw_button(rtgui_button_t* btn);
|
void rtgui_theme_draw_button(rtgui_button_t* btn);
|
||||||
void rtgui_theme_draw_label(rtgui_label_t* label);
|
void rtgui_theme_draw_label(rtgui_label_t* label);
|
||||||
void rtgui_theme_draw_textbox(rtgui_textbox_t* box);
|
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_slider(struct rtgui_slider* slider);
|
void rtgui_theme_draw_radiobox(struct rtgui_radiobox* radiobox);
|
||||||
void rtgui_theme_draw_scrollbar(struct rtgui_scrollbar* bar);
|
void rtgui_theme_draw_slider(struct rtgui_slider* slider);
|
||||||
void rtgui_theme_draw_progressbar(struct rtgui_progressbar* bar);
|
void rtgui_theme_draw_scrollbar(struct rtgui_scrollbar* bar);
|
||||||
void rtgui_theme_draw_staticline(struct rtgui_staticline* staticline);
|
void rtgui_theme_draw_progressbar(struct rtgui_progressbar* bar);
|
||||||
|
void rtgui_theme_draw_staticline(struct rtgui_staticline* staticline);
|
||||||
rt_uint16_t rtgui_theme_get_selected_height(void);
|
|
||||||
void rtgui_theme_draw_selected(struct rtgui_dc* dc, rtgui_rect_t *rect);
|
rt_uint16_t rtgui_theme_get_selected_height(void);
|
||||||
|
void rtgui_theme_draw_selected(struct rtgui_dc* dc, rtgui_rect_t *rect);
|
||||||
rtgui_color_t rtgui_theme_default_bc(void);
|
|
||||||
rtgui_color_t rtgui_theme_default_fc(void);
|
rtgui_color_t rtgui_theme_default_bc(void);
|
||||||
|
rtgui_color_t rtgui_theme_default_fc(void);
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
#ifdef __cplusplus
|
||||||
#endif
|
}
|
||||||
|
#endif
|
||||||
#endif
|
|
||||||
|
#endif
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user