Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
天中雨水
rt-thread
提交
01108b52
R
rt-thread
项目概览
天中雨水
/
rt-thread
该项目与 Fork 源项目分叉
Fork自
RT-Thread / rt-thread
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
01108b52
编写于
10月 10, 2017
作者:
B
bernard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[GUI] Update GUI engine code and add Kconfig file.
上级
f8a1bf6f
变更
81
展开全部
隐藏空白更改
内联
并排
Showing
81 changed file
with
6798 addition
and
4595 deletion
+6798
-4595
components/KConfig
components/KConfig
+4
-2
components/gui/Kconfig
components/gui/Kconfig
+61
-0
components/gui/SConscript
components/gui/SConscript
+1
-0
components/gui/include/rtgui/blit.h
components/gui/include/rtgui/blit.h
+9
-7
components/gui/include/rtgui/color.h
components/gui/include/rtgui/color.h
+15
-5
components/gui/include/rtgui/dc.h
components/gui/include/rtgui/dc.h
+59
-30
components/gui/include/rtgui/dc_client.h
components/gui/include/rtgui/dc_client.h
+0
-27
components/gui/include/rtgui/dc_draw.h
components/gui/include/rtgui/dc_draw.h
+3
-3
components/gui/include/rtgui/dc_hw.h
components/gui/include/rtgui/dc_hw.h
+0
-24
components/gui/include/rtgui/dc_trans.h
components/gui/include/rtgui/dc_trans.h
+24
-0
components/gui/include/rtgui/driver.h
components/gui/include/rtgui/driver.h
+27
-17
components/gui/include/rtgui/event.h
components/gui/include/rtgui/event.h
+25
-6
components/gui/include/rtgui/filerw.h
components/gui/include/rtgui/filerw.h
+15
-5
components/gui/include/rtgui/font.h
components/gui/include/rtgui/font.h
+16
-5
components/gui/include/rtgui/font_fnt.h
components/gui/include/rtgui/font_fnt.h
+40
-16
components/gui/include/rtgui/font_freetype.h
components/gui/include/rtgui/font_freetype.h
+26
-1
components/gui/include/rtgui/image.h
components/gui/include/rtgui/image.h
+15
-5
components/gui/include/rtgui/image_bmp.h
components/gui/include/rtgui/image_bmp.h
+15
-5
components/gui/include/rtgui/image_container.h
components/gui/include/rtgui/image_container.h
+58
-0
components/gui/include/rtgui/image_hdc.h
components/gui/include/rtgui/image_hdc.h
+31
-6
components/gui/include/rtgui/image_jpeg.h
components/gui/include/rtgui/image_jpeg.h
+0
-8
components/gui/include/rtgui/image_png.h
components/gui/include/rtgui/image_png.h
+0
-21
components/gui/include/rtgui/image_xpm.h
components/gui/include/rtgui/image_xpm.h
+0
-21
components/gui/include/rtgui/kbddef.h
components/gui/include/rtgui/kbddef.h
+15
-5
components/gui/include/rtgui/list.h
components/gui/include/rtgui/list.h
+15
-5
components/gui/include/rtgui/matrix.h
components/gui/include/rtgui/matrix.h
+45
-21
components/gui/include/rtgui/region.h
components/gui/include/rtgui/region.h
+21
-7
components/gui/include/rtgui/rtgui.h
components/gui/include/rtgui/rtgui.h
+13
-21
components/gui/include/rtgui/rtgui_app.h
components/gui/include/rtgui/rtgui_app.h
+15
-5
components/gui/include/rtgui/rtgui_config.h
components/gui/include/rtgui/rtgui_config.h
+15
-5
components/gui/include/rtgui/rtgui_object.h
components/gui/include/rtgui/rtgui_object.h
+17
-7
components/gui/include/rtgui/rtgui_server.h
components/gui/include/rtgui/rtgui_server.h
+23
-6
components/gui/include/rtgui/rtgui_system.h
components/gui/include/rtgui/rtgui_system.h
+15
-5
components/gui/include/rtgui/widgets/box.h
components/gui/include/rtgui/widgets/box.h
+15
-5
components/gui/include/rtgui/widgets/container.h
components/gui/include/rtgui/widgets/container.h
+15
-5
components/gui/include/rtgui/widgets/title.h
components/gui/include/rtgui/widgets/title.h
+15
-5
components/gui/include/rtgui/widgets/widget.h
components/gui/include/rtgui/widgets/widget.h
+6
-6
components/gui/include/rtgui/widgets/window.h
components/gui/include/rtgui/widgets/window.h
+21
-8
components/gui/src/asc12font.c
components/gui/src/asc12font.c
+15
-5
components/gui/src/asc16font.c
components/gui/src/asc16font.c
+271
-261
components/gui/src/blit.c
components/gui/src/blit.c
+592
-269
components/gui/src/box.c
components/gui/src/box.c
+15
-5
components/gui/src/color.c
components/gui/src/color.c
+15
-5
components/gui/src/container.c
components/gui/src/container.c
+44
-8
components/gui/src/dc.c
components/gui/src/dc.c
+81
-52
components/gui/src/dc_blend.c
components/gui/src/dc_blend.c
+1420
-1162
components/gui/src/dc_buffer.c
components/gui/src/dc_buffer.c
+431
-362
components/gui/src/dc_client.c
components/gui/src/dc_client.c
+45
-37
components/gui/src/dc_hw.c
components/gui/src/dc_hw.c
+24
-15
components/gui/src/dc_rotozoom.c
components/gui/src/dc_rotozoom.c
+828
-765
components/gui/src/dc_trans.c
components/gui/src/dc_trans.c
+44
-18
components/gui/src/filerw.c
components/gui/src/filerw.c
+15
-5
components/gui/src/font.c
components/gui/src/font.c
+25
-5
components/gui/src/font_bmp.c
components/gui/src/font_bmp.c
+21
-11
components/gui/src/font_fnt.c
components/gui/src/font_fnt.c
+222
-197
components/gui/src/font_freetype.c
components/gui/src/font_freetype.c
+459
-237
components/gui/src/font_hz_bmp.c
components/gui/src/font_hz_bmp.c
+23
-1
components/gui/src/font_hz_file.c
components/gui/src/font_hz_file.c
+23
-0
components/gui/src/hz12font.c
components/gui/src/hz12font.c
+23
-0
components/gui/src/hz16font.c
components/gui/src/hz16font.c
+23
-0
components/gui/src/image.c
components/gui/src/image.c
+32
-15
components/gui/src/image_bmp.c
components/gui/src/image_bmp.c
+68
-50
components/gui/src/image_container.c
components/gui/src/image_container.c
+440
-0
components/gui/src/image_hdc.c
components/gui/src/image_hdc.c
+33
-120
components/gui/src/image_jpg.c
components/gui/src/image_jpg.c
+103
-85
components/gui/src/image_png.c
components/gui/src/image_png.c
+223
-190
components/gui/src/image_xpm.c
components/gui/src/image_xpm.c
+15
-6
components/gui/src/matrix.c
components/gui/src/matrix.c
+67
-43
components/gui/src/mouse.c
components/gui/src/mouse.c
+21
-11
components/gui/src/mouse.h
components/gui/src/mouse.h
+15
-5
components/gui/src/region.c
components/gui/src/region.c
+53
-117
components/gui/src/rtgui_app.c
components/gui/src/rtgui_app.c
+23
-13
components/gui/src/rtgui_driver.c
components/gui/src/rtgui_driver.c
+75
-14
components/gui/src/rtgui_object.c
components/gui/src/rtgui_object.c
+20
-10
components/gui/src/rtgui_system.c
components/gui/src/rtgui_system.c
+38
-20
components/gui/src/server.c
components/gui/src/server.c
+67
-48
components/gui/src/title.c
components/gui/src/title.c
+20
-9
components/gui/src/topwin.c
components/gui/src/topwin.c
+27
-16
components/gui/src/topwin.h
components/gui/src/topwin.h
+15
-5
components/gui/src/widget.c
components/gui/src/widget.c
+30
-39
components/gui/src/window.c
components/gui/src/window.c
+44
-29
未找到文件。
components/KConfig
浏览文件 @
01108b52
...
...
@@ -16,10 +16,12 @@ source "$RTT_DIR/components/finsh/KConfig"
source "$RTT_DIR/components/dfs/KConfig"
source "$RTT_DIR/components/net/KConfig"
source "$RTT_DIR/components/drivers/KConfig"
source "$RTT_DIR/components/
libc
/KConfig"
source "$RTT_DIR/components/
gui
/KConfig"
source "$RTT_DIR/components/
net
/KConfig"
source "$RTT_DIR/components/
libc
/KConfig"
endmenu
components/gui/Kconfig
0 → 100644
浏览文件 @
01108b52
menu "RT-Thread UI Engine"
config RT_USING_GUIENGINE
bool "Enable UI Engine"
default n
if RT_USING_GUIENGINE
config RTGUI_NAME_MAX
int "The maximal size of name in GUI engine"
default 16
config RTGUI_USING_TTF
bool "Support TrueType font"
default n
config RTGUI_USING_FONT16
bool "Support 16 height font"
default y
config RTGUI_USING_FONT12
bool "Support 12 height font"
default y
config RTGUI_USING_FONTHZ
bool "Support Chinese font"
default n
if RTGUI_USING_FONTHZ
config RTGUI_USING_HZ_BMP
bool "Use bitmap Chinese font"
default n
endif
config RTGUI_IMAGE_XPM
bool "Support XPM image format"
default n
config RTGUI_IMAGE_JPEG
bool "Support JPEG image format"
default n
config RTGUI_IMAGE_TJPGD
bool "Use TJPGD for JPEG image"
default n
config RTGUI_IMAGE_PNG
bool "Support PNG image format"
default n
config RTGUI_IMAGE_LODEPNG
bool "Use lodepng for PNG image"
default n
config RTGUI_IMAGE_BMP
bool "Support BMP image format"
default n
endif
endmenu
components/gui/SConscript
浏览文件 @
01108b52
...
...
@@ -28,6 +28,7 @@ src/hz12font.c
src/hz16font.c
src/image.c
src/image_bmp.c
src/image_container.c
src/image_hdc.c
src/image_jpg.c
src/image_png.c
...
...
components/gui/include/rtgui/blit.h
浏览文件 @
01108b52
/*
* File : blit.h
* This file is part of RT-Thread GUI
* COPYRIGHT (C) 2006 - 201
3
, RT-Thread Development Team
* This file is part of RT-Thread GUI
Engine
* COPYRIGHT (C) 2006 - 201
7
, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -47,6 +47,7 @@
#define __RTGUI_BLIT_H__
#include <rtgui/rtgui.h>
#include <rtgui/dc.h>
/* Assemble R-G-B values into a specified pixel format and store them */
#define RGB565_FROM_RGB(Pixel, r, g, b) \
...
...
@@ -201,13 +202,13 @@ struct rtgui_blit_info
rt_uint8_t
r
,
g
,
b
,
a
;
};
struct
rtgui_
blit_info_src
struct
rtgui_
image_info
{
rt_uint8_t
*
src
;
int
src_w
,
src_h
;
int
src_skip
;
rt_uint8_t
*
pixels
;
int
src_pitch
;
rt_uint8_t
src_fmt
;
rt_uint8_t
src_fmt
;
rt_uint8_t
a
;
};
extern
const
rt_uint8_t
*
rtgui_blit_expand_byte
[
9
];
...
...
@@ -217,6 +218,7 @@ rtgui_blit_line_func rtgui_blit_line_get(int dst_bpp, int src_bpp);
rtgui_blit_line_func
rtgui_blit_line_get_inv
(
int
dst_bpp
,
int
src_bpp
);
void
rtgui_blit
(
struct
rtgui_blit_info
*
info
);
void
rtgui_image_info_blit
(
struct
rtgui_image_info
*
image
,
struct
rtgui_dc
*
dc
,
struct
rtgui_rect
*
dc_rect
);
#endif
components/gui/include/rtgui/color.h
浏览文件 @
01108b52
/*
* File : color.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/include/rtgui/dc.h
浏览文件 @
01108b52
/*
* File : dc.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -23,7 +33,7 @@ extern "C" {
#include <rtgui/driver.h>
#include <rtgui/widgets/widget.h>
#define RTGUI_DC(dc)
((struct rtgui_dc*)(dc))
#define RTGUI_DC(dc)
((struct rtgui_dc*)(dc))
#ifndef M_PI
#define M_PI 3.14159265358979323846
...
...
@@ -51,10 +61,10 @@ struct rtgui_dc_engine
};
/*
* The abstract device context
* The abstract device context
*
* Normally, a DC is a drawable canvas, user can draw point/line/cycle etc
* on the DC.
* on the DC.
*
* There are several kinds of DC:
* - Hardware DC;
...
...
@@ -70,44 +80,49 @@ struct rtgui_dc
const
struct
rtgui_dc_engine
*
engine
;
};
/*
* The hardware device context
/*
* The hardware device context
*
* The hardware DC is a context based on hardware device, for examle the
* The hardware DC is a context based on hardware device, for examle the
* LCD device. The operations on the hardware DC are reflected to the real
* hardware.
*
* hardware.
*
*/
struct
rtgui_dc_hw
{
struct
rtgui_dc
parent
;
rtgui_widget_t
*
owner
;
const
struct
rtgui_graphic_driver
*
hw_driver
;
struct
rtgui_dc
parent
;
rtgui_widget_t
*
owner
;
const
struct
rtgui_graphic_driver
*
hw_driver
;
};
/**
* The buffer dc is a device context with memory buffer.
* The buffer dc is a device context with memory buffer.
*
* All the operations on this device context is reflected to the memory buffer.
*/
struct
rtgui_dc_buffer
{
struct
rtgui_dc
parent
;
struct
rtgui_dc
parent
;
/* graphic context */
rtgui_gc_t
gc
;
/* graphic context */
rtgui_gc_t
gc
;
/* pixel format */
rt_uint8_t
pixel_format
;
rt_uint8_t
blend_mode
;
/* RTGUI_BLENDMODE: None/Blend/Add/Mod */
/* pixel format */
rt_uint8_t
pixel_format
;
rt_uint8_t
blend_mode
;
/* RTGUI_BLENDMODE: None/Blend/Add/Mod */
/* width and height */
rt_uint16_t
width
,
height
;
/* pitch */
rt_uint16_t
pitch
;
/* width and height */
rt_uint16_t
width
,
height
;
/* pitch */
rt_uint16_t
pitch
;
#ifdef RTGUI_IMAGE_CONTAINER
/* image dc */
struct
rtgui_image_item
*
image_item
;
#endif
/* pixel data */
rt_uint8_t
*
pixel
;
/* pixel data */
rt_uint8_t
*
pixel
;
};
#define RTGUI_DC_FC(dc) (rtgui_dc_get_gc(RTGUI_DC(dc))->foreground)
...
...
@@ -118,6 +133,10 @@ struct rtgui_dc_buffer
/* create a buffer dc */
struct
rtgui_dc
*
rtgui_dc_buffer_create
(
int
width
,
int
height
);
struct
rtgui_dc
*
rtgui_dc_buffer_create_pixformat
(
rt_uint8_t
pixel_format
,
int
w
,
int
h
);
#ifdef RTGUI_IMAGE_CONTAINER
struct
rtgui_dc
*
rtgui_img_dc_create_pixformat
(
rt_uint8_t
pixel_format
,
rt_uint8_t
*
pixel
,
struct
rtgui_image_item
*
image_item
);
#endif
struct
rtgui_dc
*
rtgui_dc_buffer_create_from_dc
(
struct
rtgui_dc
*
dc
);
/* create a widget dc */
...
...
@@ -125,11 +144,18 @@ struct rtgui_dc *rtgui_dc_widget_create(struct rtgui_widget * owner);
/* begin and end a drawing */
struct
rtgui_dc
*
rtgui_dc_begin_drawing
(
rtgui_widget_t
*
owner
);
void
rtgui_dc_end_drawing
(
struct
rtgui_dc
*
dc
);
void
rtgui_dc_end_drawing
(
struct
rtgui_dc
*
dc
,
rt_bool_t
update
);
/* destroy a dc */
void
rtgui_dc_destory
(
struct
rtgui_dc
*
dc
);
/* create a hardware dc */
struct
rtgui_dc
*
rtgui_dc_hw_create
(
rtgui_widget_t
*
owner
);
/* create a client dc */
struct
rtgui_dc
*
rtgui_dc_client_create
(
rtgui_widget_t
*
owner
);
void
rtgui_dc_client_init
(
rtgui_widget_t
*
owner
);
rt_uint8_t
*
rtgui_dc_buffer_get_pixel
(
struct
rtgui_dc
*
dc
);
void
rtgui_dc_draw_line
(
struct
rtgui_dc
*
dc
,
int
x1
,
int
y1
,
int
x2
,
int
y2
);
...
...
@@ -259,6 +285,9 @@ struct rtgui_dc *rtgui_dc_shrink(struct rtgui_dc *dc, int factorx, int factory);
struct
rtgui_dc
*
rtgui_dc_zoom
(
struct
rtgui_dc
*
dc
,
double
zoomx
,
double
zoomy
,
int
smooth
);
struct
rtgui_dc
*
rtgui_dc_rotozoom
(
struct
rtgui_dc
*
dc
,
double
angle
,
double
zoomx
,
double
zoomy
,
int
smooth
);
/* dc buffer dump to file */
void
rtgui_dc_buffer_dump
(
struct
rtgui_dc
*
self
,
char
*
fn
);
#ifdef __cplusplus
}
#endif
...
...
components/gui/include/rtgui/dc_client.h
已删除
100644 → 0
浏览文件 @
f8a1bf6f
/*
* File : dc_buffer.h
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2010, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
*
* Change Logs:
* Date Author Notes
* 2010-04-10 Bernard first version
* 2010-06-14 Bernard embedded hardware dc to each widget
* 2010-08-09 Bernard rename hardware dc to client dc
*/
#ifndef __RTGUI_DC_CLIENT_H__
#define __RTGUI_DC_CLIENT_H__
#include <rtgui/dc.h>
/* create a hardware dc */
struct
rtgui_dc
*
rtgui_dc_client_create
(
rtgui_widget_t
*
owner
);
void
rtgui_dc_client_init
(
rtgui_widget_t
*
owner
);
#endif
components/gui/include/rtgui/dc_draw.h
浏览文件 @
01108b52
/*
* File : dc_
blend.c
* This file is part of RT-Thread GUI
* COPYRIGHT (C) 2006 - 201
3
, RT-Thread Development Team
* File : dc_
draw.h
* This file is part of RT-Thread GUI
Engine
* COPYRIGHT (C) 2006 - 201
7
, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
components/gui/include/rtgui/dc_hw.h
已删除
100644 → 0
浏览文件 @
f8a1bf6f
/*
* File : dc_buffer.h
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2010, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
*
* Change Logs:
* Date Author Notes
* 2010-04-10 Bernard first version
* 2010-06-14 Bernard embedded hardware dc to each widget
*/
#ifndef __RTGUI_DC_HW_H__
#define __RTGUI_DC_HW_H__
#include <rtgui/dc.h>
/* create a hardware dc */
struct
rtgui_dc
*
rtgui_dc_hw_create
(
rtgui_widget_t
*
owner
);
#endif
components/gui/include/rtgui/dc_trans.h
浏览文件 @
01108b52
/*
* File : dc_trans.h
* This file is part of RT-Thread GUI Engine
* COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2010-04-10 Bernard first version
*/
#ifndef __RTGUI_DC_TRANS_H__
#define __RTGUI_DC_TRANS_H__
...
...
components/gui/include/rtgui/driver.h
浏览文件 @
01108b52
/*
* File : driver.h
* This file is part of RT
GUI in RT-Thread RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT
-Thread GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -34,17 +44,17 @@ struct rtgui_graphic_driver_ops
/* graphic extension operations */
struct
rtgui_graphic_ext_ops
{
/* some 2D operations */
void
(
*
draw_line
)(
rtgui_color_t
*
c
,
int
x1
,
int
y1
,
int
x2
,
int
y2
);
/* some 2D operations */
void
(
*
draw_line
)(
rtgui_color_t
*
c
,
int
x1
,
int
y1
,
int
x2
,
int
y2
);
void
(
*
draw_rect
)(
rtgui_color_t
*
c
,
int
x1
,
int
y1
,
int
x2
,
int
y2
);
void
(
*
fill_rect
)(
rtgui_color_t
*
c
,
int
x1
,
int
y1
,
int
x2
,
int
y2
);
void
(
*
draw_rect
)(
rtgui_color_t
*
c
,
int
x1
,
int
y1
,
int
x2
,
int
y2
);
void
(
*
fill_rect
)(
rtgui_color_t
*
c
,
int
x1
,
int
y1
,
int
x2
,
int
y2
);
void
(
*
draw_circle
)(
rtgui_color_t
*
c
,
int
x
,
int
y
,
int
r
);
void
(
*
fill_circle
)(
rtgui_color_t
*
c
,
int
x
,
int
y
,
int
r
);
void
(
*
draw_circle
)(
rtgui_color_t
*
c
,
int
x
,
int
y
,
int
r
);
void
(
*
fill_circle
)(
rtgui_color_t
*
c
,
int
x
,
int
y
,
int
r
);
void
(
*
draw_ellipse
)(
rtgui_color_t
*
c
,
int
x
,
int
y
,
int
rx
,
int
ry
);
void
(
*
fill_ellipse
)(
rtgui_color_t
*
c
,
int
x
,
int
y
,
int
rx
,
int
ry
);
void
(
*
draw_ellipse
)(
rtgui_color_t
*
c
,
int
x
,
int
y
,
int
rx
,
int
ry
);
void
(
*
fill_ellipse
)(
rtgui_color_t
*
c
,
int
x
,
int
y
,
int
rx
,
int
ry
);
};
struct
rtgui_graphic_driver
...
...
@@ -63,7 +73,7 @@ struct rtgui_graphic_driver
struct
rt_device
*
device
;
const
struct
rtgui_graphic_driver_ops
*
ops
;
const
struct
rtgui_graphic_ext_ops
*
ext_ops
;
const
struct
rtgui_graphic_ext_ops
*
ext_ops
;
};
struct
rtgui_graphic_driver
*
rtgui_graphic_driver_get_default
(
void
);
...
...
@@ -77,7 +87,7 @@ void rtgui_graphic_driver_set_framebuffer(void *fb);
rt_inline
struct
rtgui_graphic_driver
*
rtgui_graphic_get_device
()
{
return
rtgui_graphic_driver_get_default
();
return
rtgui_graphic_driver_get_default
();
}
#ifdef RTGUI_USING_HW_CURSOR
...
...
@@ -86,8 +96,8 @@ rt_inline struct rtgui_graphic_driver *rtgui_graphic_get_device()
*/
enum
rtgui_cursor_type
{
RTGUI_CURSOR_ARROW
,
RTGUI_CURSOR_HAND
,
RTGUI_CURSOR_ARROW
,
RTGUI_CURSOR_HAND
,
};
void
rtgui_cursor_set_device
(
const
char
*
device_name
);
...
...
components/gui/include/rtgui/event.h
浏览文件 @
01108b52
/*
* File : event.h
* This file is part of RT
GUI in RT-Thread RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT
-Thread GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -41,6 +51,7 @@ enum _rtgui_event_type
RTGUI_EVENT_WIN_CLOSE
,
/* close a window */
RTGUI_EVENT_WIN_MOVE
,
/* move a window */
RTGUI_EVENT_WIN_RESIZE
,
/* resize a window */
RTGUI_EVENT_WIN_UPDATE_END
,
/* update done for window */
RTGUI_EVENT_WIN_MODAL_ENTER
,
/* the window is entering modal mode.
This event should be sent after the
window got setup and before the
...
...
@@ -169,6 +180,13 @@ struct rtgui_event_win_resize
rtgui_rect_t
rect
;
};
struct
rtgui_event_win_update_end
{
_RTGUI_EVENT_WIN_ELEMENTS
rtgui_rect_t
rect
;
};
#define rtgui_event_win_destroy rtgui_event_win
#define rtgui_event_win_show rtgui_event_win
#define rtgui_event_win_hide rtgui_event_win
...
...
@@ -187,6 +205,7 @@ struct rtgui_event_win_resize
#define RTGUI_EVENT_WIN_CLOSE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_CLOSE)
#define RTGUI_EVENT_WIN_MOVE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_MOVE)
#define RTGUI_EVENT_WIN_RESIZE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_RESIZE)
#define RTGUI_EVENT_WIN_UPDATE_END_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_UPDATE_END)
#define RTGUI_EVENT_WIN_MODAL_ENTER_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_MODAL_ENTER)
/*
...
...
@@ -375,7 +394,7 @@ struct rtgui_event_kbd
#define RTGUI_EVENT_KBD_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_KBD)
/**
* RTGUI Touch Event
* RTGUI Touch Event
* NOTE: There is not touch event to user applications, it's handled by server.
*/
struct
rtgui_event_touch
...
...
components/gui/include/rtgui/filerw.h
浏览文件 @
01108b52
/*
* File : filerw.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/include/rtgui/font.h
浏览文件 @
01108b52
/*
* File : font.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -17,6 +27,7 @@
#include <rtgui/rtgui.h>
#include <rtgui/list.h>
#ifdef __cplusplus
extern
"C"
{
#endif
...
...
components/gui/include/rtgui/font_fnt.h
浏览文件 @
01108b52
/*
* File : font_fnt.h
* This file is part of RT-Thread GUI Engine
* COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2010-04-10 Bernard first version
*/
#ifndef __FONT_FNT_H__
#define __FONT_FNT_H__
...
...
@@ -7,28 +31,28 @@
/* fnt font header */
struct
fnt_header
{
rt_uint8_t
version
[
4
];
rt_uint16_t
max_width
;
rt_uint16_t
height
;
rt_uint16_t
ascent
;
rt_uint16_t
depth
;
rt_uint32_t
first_char
;
rt_uint32_t
default_char
;
rt_uint32_t
size
;
rt_uint32_t
nbits
;
rt_uint32_t
noffset
;
rt_uint32_t
nwidth
;
rt_uint8_t
version
[
4
];
rt_uint16_t
max_width
;
rt_uint16_t
height
;
rt_uint16_t
ascent
;
rt_uint16_t
depth
;
rt_uint32_t
first_char
;
rt_uint32_t
default_char
;
rt_uint32_t
size
;
rt_uint32_t
nbits
;
rt_uint32_t
noffset
;
rt_uint32_t
nwidth
;
};
typedef
rt_uint8_t
MWIMAGEBITS
;
struct
fnt_font
{
struct
fnt_header
header
;
struct
fnt_header
header
;
const
MWIMAGEBITS
*
bits
;
/* nbits */
const
rt_uint16_t
*
offset
;
/* noffset */
const
rt_uint8_t
*
width
;
/* nwidth */
const
MWIMAGEBITS
*
bits
;
/* nbits */
const
rt_uint16_t
*
offset
;
/* noffset */
const
rt_uint8_t
*
width
;
/* nwidth */
};
extern
const
struct
rtgui_font_engine
fnt_font_engine
;
...
...
components/gui/include/rtgui/font_freetype.h
浏览文件 @
01108b52
/*
* File : font_freetype.h
* This file is part of RT-Thread GUI Engine
* COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2010-04-10 Bernard first version
*/
#ifndef __RTGUI_FONT_TTF_H__
#define __RTGUI_FONT_TTF_H__
...
...
@@ -8,7 +32,8 @@
extern
"C"
{
#endif
rtgui_font_t
*
rtgui_freetype_font_create
(
const
char
*
filename
,
int
bold
,
int
italic
,
rt_size_t
size
);
void
rtgui_ttf_system_init
(
void
);
rtgui_font_t
*
rtgui_freetype_font_create
(
const
char
*
filename
,
rt_size_t
size
);
void
rtgui_freetype_font_destroy
(
rtgui_font_t
*
font
);
#ifdef __cplusplus
...
...
components/gui/include/rtgui/image.h
浏览文件 @
01108b52
/*
* File : image.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/include/rtgui/image_bmp.h
浏览文件 @
01108b52
/*
* File : image_bmp.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/include/rtgui/image_container.h
0 → 100644
浏览文件 @
01108b52
/*
* File : image_container.h
* This file is part of RT-Thread GUI Engine
* COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2010-04-10 Bernard first version
*/
#ifndef __RTGUI_IMAGE_CONTAINER_H__
#define __RTGUI_IMAGE_CONTAINER_H__
#ifdef __cplusplus
extern
"C"
{
#endif
#include <rtgui/rtgui.h>
#include <rtgui/image.h>
#if defined(RTGUI_IMAGE_CONTAINER)
/* image item in image container */
struct
rtgui_image_item
{
rtgui_image_t
*
image
;
char
*
filename
;
rt_uint32_t
refcount
;
};
typedef
struct
rtgui_image_item
rtgui_image_item_t
;
void
rtgui_system_image_container_init
(
void
);
struct
rtgui_image_item
*
rtgui_image_container_get
(
const
char
*
filename
);
void
rtgui_image_container_put
(
struct
rtgui_image_item
*
item
);
#endif
#ifdef __cplusplus
}
#endif
#endif
components/gui/include/rtgui/image_hdc.h
浏览文件 @
01108b52
/*
* File : image_
xpm
.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* File : image_
hdc
.h
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -27,6 +37,21 @@ struct rtgui_image_hdcmm
rt_uint8_t
*
pixels
;
};
struct
rtgui_image_hdc
{
rt_bool_t
is_loaded
;
/* hdc image information */
rt_uint16_t
byte_per_pixel
;
rt_uint16_t
pitch
;
rt_uint8_t
pixel_format
;
rt_size_t
pixel_offset
;
rt_uint8_t
*
pixels
;
struct
rtgui_filerw
*
filerw
;
};
void
rtgui_image_hdc_init
(
void
);
extern
const
struct
rtgui_image_engine
rtgui_image_hdcmm_engine
;
...
...
components/gui/include/rtgui/image_jpeg.h
已删除
100644 → 0
浏览文件 @
f8a1bf6f
#ifndef __RTGUI_IMAGE_JPEG_H__
#define __RTGUI_IMAGE_JPEG_H__
#include <rtgui/image.h>
void
rtgui_image_jpeg_init
(
void
);
#endif
components/gui/include/rtgui/image_png.h
已删除
100644 → 0
浏览文件 @
f8a1bf6f
/*
* File : image_png.h
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
*
* Change Logs:
* Date Author Notes
* 2009-10-16 Bernard first version
*/
#ifndef __RTGUI_IMAGE_PNG_H__
#define __RTGUI_IMAGE_PNG_H__
#include <rtgui/image.h>
void
rtgui_image_png_init
(
void
);
#endif
components/gui/include/rtgui/image_xpm.h
已删除
100644 → 0
浏览文件 @
f8a1bf6f
/*
* File : image_xpm.h
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
*
* Change Logs:
* Date Author Notes
* 2009-10-16 Bernard first version
*/
#ifndef __RTGUI_IMAGE_XPM_H__
#define __RTGUI_IMAGE_XPM_H__
#include <rtgui/image.h>
void
rtgui_image_xpm_init
(
void
);
#endif
components/gui/include/rtgui/kbddef.h
浏览文件 @
01108b52
/*
* File : kbddef.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/include/rtgui/list.h
浏览文件 @
01108b52
/*
* File : list.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/include/rtgui/matrix.h
浏览文件 @
01108b52
/*
* File : matrix.h
* This file is part of RT-Thread GUI Engine
* COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2010-04-10 Grissiom The first version
*/
#ifndef __MATRIX_H__
#define __MATRIX_H__
...
...
@@ -12,7 +36,7 @@
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
...
...
@@ -60,7 +84,7 @@ struct rtgui_matrix
* fraction(m/RTGUI_MATRIX_FRAC). While the unit of m[4-5] is pixel.
*
*/
int
m
[
6
];
int
m
[
6
];
};
rt_inline
int32_t
_rtgui_matrix_round_div32
(
int32_t
n
,
int32_t
d
)
...
...
@@ -100,22 +124,22 @@ rt_inline void rtgui_matrix_mul(struct rtgui_matrix *mm,
const
struct
rtgui_matrix
*
mm1
,
const
struct
rtgui_matrix
*
mm2
)
{
int
*
m
=
mm
->
m
;
const
int
*
m1
=
mm1
->
m
;
const
int
*
m2
=
mm2
->
m
;
m
[
0
]
=
_rtgui_matrix_round_div32
(
m1
[
0
]
*
m2
[
0
]
+
m1
[
1
]
*
m2
[
2
],
RTGUI_MATRIX_FRAC
);
m
[
1
]
=
_rtgui_matrix_round_div32
(
m1
[
0
]
*
m2
[
1
]
+
m1
[
1
]
*
m2
[
3
],
RTGUI_MATRIX_FRAC
);
m
[
2
]
=
_rtgui_matrix_round_div32
(
m1
[
2
]
*
m2
[
0
]
+
m1
[
3
]
*
m2
[
2
],
RTGUI_MATRIX_FRAC
);
m
[
3
]
=
_rtgui_matrix_round_div32
(
m1
[
2
]
*
m2
[
1
]
+
m1
[
3
]
*
m2
[
3
],
RTGUI_MATRIX_FRAC
);
m
[
4
]
=
_rtgui_matrix_round_div32
(
m1
[
4
]
*
m2
[
0
]
+
m1
[
5
]
*
m2
[
2
],
RTGUI_MATRIX_FRAC
)
+
m2
[
4
];
m
[
5
]
=
_rtgui_matrix_round_div32
(
m1
[
4
]
*
m2
[
1
]
+
m1
[
5
]
*
m2
[
3
],
RTGUI_MATRIX_FRAC
)
+
m2
[
5
];
int
*
m
=
mm
->
m
;
const
int
*
m1
=
mm1
->
m
;
const
int
*
m2
=
mm2
->
m
;
m
[
0
]
=
_rtgui_matrix_round_div32
(
m1
[
0
]
*
m2
[
0
]
+
m1
[
1
]
*
m2
[
2
],
RTGUI_MATRIX_FRAC
);
m
[
1
]
=
_rtgui_matrix_round_div32
(
m1
[
0
]
*
m2
[
1
]
+
m1
[
1
]
*
m2
[
3
],
RTGUI_MATRIX_FRAC
);
m
[
2
]
=
_rtgui_matrix_round_div32
(
m1
[
2
]
*
m2
[
0
]
+
m1
[
3
]
*
m2
[
2
],
RTGUI_MATRIX_FRAC
);
m
[
3
]
=
_rtgui_matrix_round_div32
(
m1
[
2
]
*
m2
[
1
]
+
m1
[
3
]
*
m2
[
3
],
RTGUI_MATRIX_FRAC
);
m
[
4
]
=
_rtgui_matrix_round_div32
(
m1
[
4
]
*
m2
[
0
]
+
m1
[
5
]
*
m2
[
2
],
RTGUI_MATRIX_FRAC
)
+
m2
[
4
];
m
[
5
]
=
_rtgui_matrix_round_div32
(
m1
[
4
]
*
m2
[
1
]
+
m1
[
5
]
*
m2
[
3
],
RTGUI_MATRIX_FRAC
)
+
m2
[
5
];
}
/* Matrix multiply point[(p) = (x, y) * m], ignore the movement components. */
rt_inline
void
rtgui_matrix_mul_point_nomove
(
struct
rtgui_point
*
p
,
int
x
,
int
y
,
struct
rtgui_matrix
*
m
)
int
x
,
int
y
,
struct
rtgui_matrix
*
m
)
{
int
*
mm
=
m
->
m
;
...
...
@@ -137,13 +161,13 @@ rt_inline void rtgui_matrix_mul_point(struct rtgui_point *p,
/** Set @mm to an identity matrix. */
rt_inline
void
rtgu_matrix_identity
(
struct
rtgui_matrix
*
mm
)
{
int
*
mat
=
mm
->
m
;
mat
[
0
]
=
RTGUI_MATRIX_FRAC
;
mat
[
1
]
=
0
;
mat
[
2
]
=
0
;
mat
[
3
]
=
RTGUI_MATRIX_FRAC
;
mat
[
4
]
=
0
;
mat
[
5
]
=
0
;
int
*
mat
=
mm
->
m
;
mat
[
0
]
=
RTGUI_MATRIX_FRAC
;
mat
[
1
]
=
0
;
mat
[
2
]
=
0
;
mat
[
3
]
=
RTGUI_MATRIX_FRAC
;
mat
[
4
]
=
0
;
mat
[
5
]
=
0
;
}
/** Save the inversed matrix of @mm to @mo.
...
...
components/gui/include/rtgui/region.h
浏览文件 @
01108b52
/*
* File : region.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -90,6 +100,7 @@ int rtgui_region_is_flat(rtgui_region_t *region);
extern
rtgui_rect_t
rtgui_empty_rect
;
void
rtgui_rect_moveto
(
rtgui_rect_t
*
rect
,
int
x
,
int
y
);
void
rtgui_rect_moveto_point
(
rtgui_rect_t
*
rect
,
int
x
,
int
y
);
void
rtgui_rect_moveto_align
(
const
rtgui_rect_t
*
rect
,
rtgui_rect_t
*
to
,
int
align
);
void
rtgui_rect_inflate
(
rtgui_rect_t
*
rect
,
int
d
);
void
rtgui_rect_intersect
(
rtgui_rect_t
*
src
,
rtgui_rect_t
*
dest
);
...
...
@@ -98,11 +109,14 @@ int rtgui_rect_is_intersect(const rtgui_rect_t *rect1, const rtgui_rect_t *rect
int
rtgui_rect_is_equal
(
const
rtgui_rect_t
*
rect1
,
const
rtgui_rect_t
*
rect2
);
rtgui_rect_t
*
rtgui_rect_set
(
rtgui_rect_t
*
rect
,
int
x
,
int
y
,
int
w
,
int
h
);
rt_bool_t
rtgui_rect_is_empty
(
const
rtgui_rect_t
*
rect
);
void
rtgui_rect_union
(
rtgui_rect_t
*
src
,
rtgui_rect_t
*
dest
);
rt_inline
void
rtgui_rect_init
(
rtgui_rect_t
*
rect
,
int
x
,
int
y
,
int
width
,
int
height
)
{
rect
->
x1
=
x
;
rect
->
y1
=
y
;
rect
->
x2
=
x
+
width
;
rect
->
y2
=
y
+
height
;
rect
->
x1
=
x
;
rect
->
y1
=
y
;
rect
->
x2
=
x
+
width
;
rect
->
y2
=
y
+
height
;
}
#define RTGUI_RECT(rect, x, y, w, h) \
...
...
components/gui/include/rtgui/rtgui.h
浏览文件 @
01108b52
/*
* File : rtgui.h
* This file is part of RT-Thread GUI
* COPYRIGHT (C) 200
9 - 2013
, RT-Thread Development Team
* This file is part of RT-Thread GUI
Engine
* COPYRIGHT (C) 200
6 - 2017
, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -31,19 +31,10 @@
extern
"C"
{
#endif
#define RTGUI_VERSION 0L
/**< major version number */
#define RTGUI_SUBVERSION 8L
/**< minor version number */
#define RTGUI_REVISION 1L
/**< revise version number */
#define RTGUI_CODENAME "Newton"
/**< code name */
#define RT_INT16_MAX 32767
#define RT_INT16_MIN (-RT_INT16_MAX-1)
#define RTGUI_NOT_FOUND (-1)
#define _UI_MIN(x, y) (((x)<(y))?(x):(y))
#define _UI_MAX(x, y) (((x)>(y))?(x):(y))
#define _UI_BITBYTES(bits) ((bits + 7)/8)
#define _UI_ABS(x) ((x)>=0? (x):-(x))
#define _UI_MIN(x, y) (((x)<(y))?(x):(y))
#define _UI_MAX(x, y) (((x)>(y))?(x):(y))
#define _UI_BITBYTES(bits) ((bits + 7)/8)
#define _UI_ABS(x) ((x)>=0? (x):-(x))
/* MDK, GCC and MSVC all support __restrict keyword. */
#define RTGUI_RESTRICT __restrict
...
...
@@ -136,13 +127,13 @@ enum RTGUI_BORDER_STYLE
/**
* Blend mode
*/
*/
enum
RTGUI_BLENDMODE
{
RTGUI_BLENDMODE_NONE
=
0x00
,
RTGUI_BLENDMODE_BLEND
,
RTGUI_BLENDMODE_ADD
,
RTGUI_BLENDMODE_MOD
,
RTGUI_BLENDMODE_NONE
=
0x00
,
RTGUI_BLENDMODE_BLEND
,
RTGUI_BLENDMODE_ADD
,
RTGUI_BLENDMODE_MOD
,
};
/**
...
...
@@ -180,7 +171,8 @@ enum RTGUI_TEXTSTYLE
enum
RTGUI_MODAL_CODE
{
RTGUI_MODAL_OK
,
RTGUI_MODAL_CANCEL
RTGUI_MODAL_CANCEL
,
RTGUI_MODAL_MAX
=
0xFFFF
,
};
typedef
enum
RTGUI_MODAL_CODE
rtgui_modal_code_t
;
...
...
components/gui/include/rtgui/rtgui_app.h
浏览文件 @
01108b52
/*
* File : rtgui_app.h
* This file is part of RT
GUI in RT-Thread RTOS
* COPYRIGHT (C) 2006 - 201
2
, RT-Thread Development Team
* This file is part of RT
-Thread GUI Engine
* COPYRIGHT (C) 2006 - 201
7
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/include/rtgui/rtgui_config.h
浏览文件 @
01108b52
/*
* File : rtgui_config.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/include/rtgui/rtgui_object.h
浏览文件 @
01108b52
/*
* File : rtgui_object.h
* This file is part of RT
GUI in RT-Thread RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT
-Thread GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -81,10 +91,10 @@ const char *rtgui_type_name_get(const rtgui_type_t *type);
const
rtgui_type_t
*
rtgui_object_object_type_get
(
rtgui_object_t
*
object
);
#ifdef RTGUI_USING_CAST_CHECK
#define RTGUI_OBJECT_CAST(obj, obj_type, c_type) \
#define RTGUI_OBJECT_CAST(obj, obj_type, c_type) \
((c_type *)rtgui_object_check_cast((rtgui_object_t *)(obj), (obj_type), __FUNCTION__, __LINE__))
#else
#define RTGUI_OBJECT_CAST(obj, obj_type, c_type) ((c_type *)(obj))
#define RTGUI_OBJECT_CAST(obj, obj_type, c_type) ((c_type *)(obj))
#endif
#define RTGUI_OBJECT_CHECK_TYPE(_obj, _type) \
...
...
components/gui/include/rtgui/rtgui_server.h
浏览文件 @
01108b52
/*
* File : rtgui_server.h
* This file is part of RT
GUI in RT-Thread RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT
-Thread GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -14,6 +24,10 @@
#ifndef __RTGUI_SERVER_H__
#define __RTGUI_SERVER_H__
#ifdef __cplusplus
extern
"C"
{
#endif
#include <rtservice.h>
#include <rtgui/list.h>
...
...
@@ -72,8 +86,11 @@ void rtgui_server_install_show_win_hook(void (*hk)(void));
void
rtgui_server_install_act_win_hook
(
void
(
*
hk
)(
void
));
/* post an event to server */
void
rtgui_server_post_event
(
struct
rtgui_event
*
event
,
rt_size_t
size
);
rt_err_t
rtgui_server_post_event
(
struct
rtgui_event
*
event
,
rt_size_t
size
);
rt_err_t
rtgui_server_post_event_sync
(
struct
rtgui_event
*
event
,
rt_size_t
size
);
#ifdef __cplusplus
}
#endif
#endif
components/gui/include/rtgui/rtgui_system.h
浏览文件 @
01108b52
/*
* File : rtgui_system.h
* This file is part of RT
GUI in RT-Thread RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT
-Thread GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/include/rtgui/widgets/box.h
浏览文件 @
01108b52
/*
* File : box.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/include/rtgui/widgets/container.h
浏览文件 @
01108b52
/*
* File : container.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/include/rtgui/widgets/title.h
浏览文件 @
01108b52
/*
* File : title.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/include/rtgui/widgets/widget.h
浏览文件 @
01108b52
/*
* File : widget.h
* This file is part of RT-Thread GUI
* COPYRIGHT (C) 2006 - 201
3
, RT-Thread Development Team
* This file is part of RT-Thread GUI
Engine
* COPYRIGHT (C) 2006 - 201
7
, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -110,6 +110,10 @@ struct rtgui_widget
/* the widget extent */
rtgui_rect_t
extent
;
/* the visiable extent (includes the rectangles of children) */
rtgui_rect_t
extent_visiable
;
/* the rect clip information */
rtgui_region_t
clip
;
/* minimal width and height of widget */
rt_int16_t
min_width
,
min_height
;
...
...
@@ -117,13 +121,10 @@ struct rtgui_widget
rt_int32_t
align
;
rt_uint16_t
border
;
rt_uint16_t
border_style
;
/* the rect clip */
rtgui_region_t
clip
;
/* call back */
rt_bool_t
(
*
on_focus_in
)(
struct
rtgui_object
*
widget
,
struct
rtgui_event
*
event
);
rt_bool_t
(
*
on_focus_out
)(
struct
rtgui_object
*
widget
,
struct
rtgui_event
*
event
);
rt_bool_t
(
*
on_paint
)(
struct
rtgui_object
*
widget
,
struct
rtgui_event
*
event
);
/* user private data */
rt_uint32_t
user_data
;
...
...
@@ -142,7 +143,6 @@ void rtgui_widget_unfocus(rtgui_widget_t *widget);
/* event handler for each command */
void
rtgui_widget_set_onfocus
(
rtgui_widget_t
*
widget
,
rtgui_event_handler_ptr
handler
);
void
rtgui_widget_set_onunfocus
(
rtgui_widget_t
*
widget
,
rtgui_event_handler_ptr
handler
);
void
rtgui_widget_set_onpaint
(
rtgui_widget_t
*
widget
,
rtgui_event_handler_ptr
handler
);
/* get and set rect of widget */
void
rtgui_widget_get_rect
(
rtgui_widget_t
*
widget
,
rtgui_rect_t
*
rect
);
...
...
components/gui/include/rtgui/widgets/window.h
浏览文件 @
01108b52
/*
* File : window.h
* This file is part of RT
GUI in RT-Thread RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT
-Thread GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -80,6 +90,7 @@ struct rtgui_win
/* drawing count */
rt_base_t
drawing
;
struct
rtgui_rect
drawing_rect
;
/* parent window. RT_NULL if the window is a top level window */
struct
rtgui_win
*
parent_window
;
...
...
@@ -135,9 +146,9 @@ rtgui_win_t *rtgui_mainwin_create(struct rtgui_win *parent_window, const char *t
void
rtgui_win_destroy
(
rtgui_win_t
*
win
);
int
rtgui_win_init
(
struct
rtgui_win
*
win
,
struct
rtgui_win
*
parent_window
,
const
char
*
title
,
rtgui_rect_t
*
rect
,
rt_uint16_t
style
);
const
char
*
title
,
rtgui_rect_t
*
rect
,
rt_uint16_t
style
);
int
rtgui_win_fini
(
struct
rtgui_win
*
win
);
/** Close window.
...
...
@@ -183,6 +194,8 @@ struct rtgui_dc *rtgui_win_get_drawing(rtgui_win_t * win);
struct
rtgui_win
*
rtgui_win_get_topmost_shown
(
void
);
struct
rtgui_win
*
rtgui_win_get_next_shown
(
void
);
void
rtgui_theme_draw_win
(
struct
rtgui_wintitle
*
wint
);
#ifdef __cplusplus
}
#endif
...
...
components/gui/src/asc12font.c
浏览文件 @
01108b52
/*
* File : asc12font.c
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/src/asc16font.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/blit.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/box.c
浏览文件 @
01108b52
/*
* File : box.c
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/src/color.c
浏览文件 @
01108b52
/*
* File : color.c
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/src/container.c
浏览文件 @
01108b52
/*
* File : container.c
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -49,15 +59,41 @@ rt_bool_t rtgui_container_dispatch_event(rtgui_container_t *container, rtgui_eve
{
/* handle in child widget */
struct
rtgui_list_node
*
node
;
rtgui_event_t
_event
,
save_event
=
*
event
;
rtgui_widget_t
*
widget
=
(
rtgui_widget_t
*
)
container
;
rtgui_list_foreach
(
node
,
&
(
container
->
children
))
{
struct
rtgui_widget
*
w
;
w
=
rtgui_list_entry
(
node
,
struct
rtgui_widget
,
sibling
);
_event
=
save_event
;
if
(
RTGUI_EVENT_PAINT
&
_event
.
type
)
{
if
(
widget
->
extent
.
x1
>
w
->
extent
.
x2
)
{
_event
.
type
&=
!
RTGUI_EVENT_PAINT
;
}
else
if
(
widget
->
extent
.
x2
<
w
->
extent
.
x1
)
{
_event
.
type
&=
!
RTGUI_EVENT_PAINT
;
}
else
if
(
widget
->
extent
.
y1
>
w
->
extent
.
y2
)
{
_event
.
type
&=
!
RTGUI_EVENT_PAINT
;
}
else
if
(
widget
->
extent
.
y2
<
w
->
extent
.
y1
)
{
_event
.
type
&=
!
RTGUI_EVENT_PAINT
;
}
}
if
(
RTGUI_OBJECT
(
w
)
->
event_handler
&&
RTGUI_OBJECT
(
w
)
->
event_handler
(
RTGUI_OBJECT
(
w
),
event
)
==
RT_TRUE
)
RTGUI_OBJECT
(
w
)
->
event_handler
(
RTGUI_OBJECT
(
w
),
&
_event
)
==
RT_TRUE
)
{
return
RT_TRUE
;
}
}
return
RT_FALSE
;
...
...
@@ -140,7 +176,7 @@ rt_bool_t rtgui_container_event_handler(struct rtgui_object *object, struct rtgu
/* paint on each child */
rtgui_container_dispatch_event
(
container
,
event
);
rtgui_dc_end_drawing
(
dc
);
rtgui_dc_end_drawing
(
dc
,
1
);
}
break
;
...
...
@@ -158,8 +194,8 @@ rt_bool_t rtgui_container_event_handler(struct rtgui_object *object, struct rtgu
rtgui_container_dispatch_event
(
container
,
event
);
break
;
case
RTGUI_EVENT_HIDE
:
rtgui_widget_onhide
(
RTGUI_OBJECT
(
container
),
event
);
rtgui_container_dispatch_event
(
container
,
event
);
rtgui_widget_onhide
(
RTGUI_OBJECT
(
container
),
event
);
break
;
case
RTGUI_EVENT_COMMAND
:
rtgui_container_dispatch_event
(
container
,
event
);
...
...
components/gui/src/dc.c
浏览文件 @
01108b52
/*
* File : dc.c
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -19,8 +29,6 @@
#include <math.h>
#include <rtgui/dc.h>
#include <rtgui/dc_hw.h>
#include <rtgui/dc_client.h>
#include <rtgui/rtgui_system.h>
#include <rtgui/rtgui_server.h>
...
...
@@ -690,21 +698,20 @@ void rtgui_dc_draw_arc(struct rtgui_dc *dc, rt_int16_t x, rt_int16_t y, rt_int16
/*
* Draw arc
* Octant labelling
*
* \ 5 | 6 /
* \ | /
* 4 \ | / 7
* \|/
*------+------ +x
* /|\
* 3 / | \ 0
* / | \
* / 2 | 1 \
* +y
*/
// Octant labelling
//
// \ 5 | 6 /
// \ | /
// 4 \ | / 7
// \|/
//------+------ +x
// /|\
// 3 / | \ 0
// / | \
// / 2 | 1 \
// +y
drawoct
=
0
;
// 0x00000000
// whether or not to keep drawing a given octant.
// For example: 0x00111100 means we're drawing in octants 2-5
...
...
@@ -1319,18 +1326,20 @@ void rtgui_dc_draw_pie(struct rtgui_dc *dc, rt_int16_t x, rt_int16_t y, rt_int16
}
RTM_EXPORT
(
rtgui_dc_draw_pie
);
// Octant labelling
//
// \ 5 | 6 /
// \ | /
// 4 \ | / 7
// \|/
//------+------ +x
// /|\
// 3 / | \ 0
// / | \
// / 2 | 1 \
// +y
/*
* Octant labelling
*
* \ 5 | 6 /
* \ | /
* 4 \ | / 7
* \|/
*------+------ +x
* /|\
* 3 / | \ 0
* / | \
* / 2 | 1 \
* +y
*/
static
void
_draw_octant
(
struct
rtgui_dc
*
dc
,
rt_int16_t
ox
,
rt_int16_t
oy
,
rt_int16_t
y1
,
rt_int16_t
y2
,
rt_int16_t
x
,
int
oct
)
...
...
@@ -1814,6 +1823,10 @@ struct rtgui_dc *rtgui_dc_begin_drawing(rtgui_widget_t *owner)
return
RT_NULL
;
/* increase drawing count */
if
(
win
->
drawing
==
0
)
{
memset
(
&
(
win
->
drawing_rect
),
0x0
,
sizeof
(
struct
rtgui_rect
));
}
win
->
drawing
++
;
/* always drawing on the virtual mode */
...
...
@@ -1873,7 +1886,7 @@ struct rtgui_dc *rtgui_dc_begin_drawing(rtgui_widget_t *owner)
}
RTM_EXPORT
(
rtgui_dc_begin_drawing
);
void
rtgui_dc_end_drawing
(
struct
rtgui_dc
*
dc
)
void
rtgui_dc_end_drawing
(
struct
rtgui_dc
*
dc
,
rt_bool_t
update
)
{
struct
rtgui_widget
*
owner
;
struct
rtgui_win
*
win
;
...
...
@@ -1889,30 +1902,47 @@ void rtgui_dc_end_drawing(struct rtgui_dc *dc)
/* get window */
win
=
owner
->
toplevel
;
/* union drawing rect */
rtgui_rect_union
(
&
(
owner
->
extent_visiable
),
&
(
win
->
drawing_rect
));
/* decrease drawing counter */
win
->
drawing
--
;
if
(
win
->
drawing
==
0
&&
rtgui_graphic_driver_is_vmode
()
==
RT_FALSE
)
{
#ifdef RTGUI_USING_MOUSE_CURSOR
rt_mutex_release
(
&
cursor_mutex
);
/* show cursor */
rtgui_mouse_show_cursor
();
#endif
win
->
drawing
--
;
if
(
RTGUI_IS_WINTITLE
(
win
))
if
(
win
->
drawing
==
0
)
{
/* notify window to handle window update done */
if
(
RTGUI_OBJECT
(
win
)
->
event_handler
)
{
/* update screen */
rtgui_graphic_driver_screen_update
(
rtgui_graphic_driver_get_default
(),
&
(
owner
->
extent
));
struct
rtgui_event_win_update_end
ewin_update
;
RTGUI_EVENT_WIN_UPDATE_END_INIT
(
&
(
ewin_update
));
ewin_update
.
rect
=
win
->
drawing_rect
;
RTGUI_OBJECT
(
win
)
->
event_handler
(
RTGUI_OBJECT
(
win
),
(
struct
rtgui_event
*
)
&
ewin_update
);
}
else
if
(
rtgui_graphic_driver_is_vmode
()
==
RT_FALSE
&&
update
)
{
/* send to server for window update */
struct
rtgui_event_update_end
eupdate
;
RTGUI_EVENT_UPDATE_END_INIT
(
&
(
eupdate
));
eupdate
.
rect
=
owner
->
extent
;
#ifdef RTGUI_USING_MOUSE_CURSOR
rt_mutex_release
(
&
cursor_mutex
);
/* show cursor */
rtgui_mouse_show_cursor
();
#endif
rtgui_server_post_event
((
struct
rtgui_event
*
)
&
eupdate
,
sizeof
(
eupdate
));
if
(
RTGUI_IS_WINTITLE
(
win
))
{
/* update screen */
rtgui_graphic_driver_screen_update
(
rtgui_graphic_driver_get_default
(),
&
(
owner
->
extent
));
}
else
{
/* send to server for window update */
struct
rtgui_event_update_end
eupdate
;
RTGUI_EVENT_UPDATE_END_INIT
(
&
(
eupdate
));
eupdate
.
rect
=
owner
->
extent
;
rtgui_server_post_event
((
struct
rtgui_event
*
)
&
eupdate
,
sizeof
(
eupdate
));
}
}
}
...
...
@@ -1920,4 +1950,3 @@ void rtgui_dc_end_drawing(struct rtgui_dc *dc)
rtgui_screen_unlock
();
}
RTM_EXPORT
(
rtgui_dc_end_drawing
);
components/gui/src/dc_blend.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/dc_buffer.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/dc_client.c
浏览文件 @
01108b52
/*
* File : dc_client.c
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -16,8 +26,6 @@
* 2010-09-14 Bernard fix vline and hline coordinate issue
*/
#include <rtgui/dc.h>
#include <rtgui/dc_hw.h>
#include <rtgui/dc_client.h>
#include <rtgui/driver.h>
#include <rtgui/rtgui_system.h>
...
...
@@ -88,7 +96,7 @@ static void rtgui_dc_client_draw_point(struct rtgui_dc *self, int x, int y)
rtgui_widget_t
*
owner
;
if
(
self
==
RT_NULL
)
return
;
if
(
!
rtgui_dc_get_visible
(
self
))
return
;
if
(
!
rtgui_dc_get_visible
(
self
))
return
;
/* get owner */
owner
=
RTGUI_CONTAINER_OF
(
self
,
struct
rtgui_widget
,
dc_type
);
...
...
@@ -109,7 +117,7 @@ static void rtgui_dc_client_draw_color_point(struct rtgui_dc *self, int x, int y
rtgui_widget_t
*
owner
;
if
(
self
==
RT_NULL
)
return
;
if
(
!
rtgui_dc_get_visible
(
self
))
return
;
if
(
!
rtgui_dc_get_visible
(
self
))
return
;
/* get owner */
owner
=
RTGUI_CONTAINER_OF
(
self
,
struct
rtgui_widget
,
dc_type
);
...
...
@@ -133,7 +141,7 @@ static void rtgui_dc_client_draw_vline(struct rtgui_dc *self, int x, int y1, int
rtgui_widget_t
*
owner
;
if
(
self
==
RT_NULL
)
return
;
if
(
!
rtgui_dc_get_visible
(
self
))
return
;
if
(
!
rtgui_dc_get_visible
(
self
))
return
;
/* get owner */
owner
=
RTGUI_CONTAINER_OF
(
self
,
struct
rtgui_widget
,
dc_type
);
...
...
@@ -160,26 +168,26 @@ static void rtgui_dc_client_draw_vline(struct rtgui_dc *self, int x, int y1, int
hw_driver
->
ops
->
draw_vline
(
&
(
owner
->
gc
.
foreground
),
x
,
y1
,
y2
);
}
else
{
for
(
index
=
0
;
index
<
rtgui_region_num_rects
(
&
(
owner
->
clip
));
index
++
)
{
rtgui_rect_t
*
prect
;
register
rt_base_t
draw_y1
,
draw_y2
;
prect
=
((
rtgui_rect_t
*
)(
owner
->
clip
.
data
+
index
+
1
));
draw_y1
=
y1
;
draw_y2
=
y2
;
/* calculate vline clip */
if
(
prect
->
x1
>
x
||
prect
->
x2
<=
x
)
continue
;
if
(
prect
->
y2
<=
y1
||
prect
->
y1
>
y2
)
continue
;
if
(
prect
->
y1
>
y1
)
draw_y1
=
prect
->
y1
;
if
(
prect
->
y2
<
y2
)
draw_y2
=
prect
->
y2
;
/* draw vline */
hw_driver
->
ops
->
draw_vline
(
&
(
owner
->
gc
.
foreground
),
x
,
draw_y1
,
draw_y2
);
}
{
for
(
index
=
0
;
index
<
rtgui_region_num_rects
(
&
(
owner
->
clip
));
index
++
)
{
rtgui_rect_t
*
prect
;
register
rt_base_t
draw_y1
,
draw_y2
;
prect
=
((
rtgui_rect_t
*
)(
owner
->
clip
.
data
+
index
+
1
));
draw_y1
=
y1
;
draw_y2
=
y2
;
/* calculate vline clip */
if
(
prect
->
x1
>
x
||
prect
->
x2
<=
x
)
continue
;
if
(
prect
->
y2
<=
y1
||
prect
->
y1
>
y2
)
continue
;
if
(
prect
->
y1
>
y1
)
draw_y1
=
prect
->
y1
;
if
(
prect
->
y2
<
y2
)
draw_y2
=
prect
->
y2
;
/* draw vline */
hw_driver
->
ops
->
draw_vline
(
&
(
owner
->
gc
.
foreground
),
x
,
draw_y1
,
draw_y2
);
}
}
}
...
...
@@ -192,7 +200,7 @@ static void rtgui_dc_client_draw_hline(struct rtgui_dc *self, int x1, int x2, in
rtgui_widget_t
*
owner
;
if
(
self
==
RT_NULL
)
return
;
if
(
!
rtgui_dc_get_visible
(
self
))
return
;
if
(
!
rtgui_dc_get_visible
(
self
))
return
;
/* get owner */
owner
=
RTGUI_CONTAINER_OF
(
self
,
struct
rtgui_widget
,
dc_type
);
...
...
@@ -220,8 +228,8 @@ static void rtgui_dc_client_draw_hline(struct rtgui_dc *self, int x1, int x2, in
hw_driver
->
ops
->
draw_hline
(
&
(
owner
->
gc
.
foreground
),
x1
,
x2
,
y
);
}
else
{
for
(
index
=
0
;
index
<
rtgui_region_num_rects
(
&
(
owner
->
clip
));
index
++
)
{
for
(
index
=
0
;
index
<
rtgui_region_num_rects
(
&
(
owner
->
clip
));
index
++
)
{
rtgui_rect_t
*
prect
;
register
rt_base_t
draw_x1
,
draw_x2
;
...
...
@@ -252,7 +260,7 @@ static void rtgui_dc_client_fill_rect(struct rtgui_dc *self, struct rtgui_rect *
RT_ASSERT
(
self
);
RT_ASSERT
(
rect
);
if
(
!
rtgui_dc_get_visible
(
self
))
return
;
if
(
!
rtgui_dc_get_visible
(
self
))
return
;
/* get owner */
owner
=
RTGUI_CONTAINER_OF
(
self
,
struct
rtgui_widget
,
dc_type
);
...
...
@@ -279,7 +287,7 @@ static void rtgui_dc_client_blit_line(struct rtgui_dc *self, int x1, int x2, int
rtgui_widget_t
*
owner
;
if
(
self
==
RT_NULL
)
return
;
if
(
!
rtgui_dc_get_visible
(
self
))
return
;
if
(
!
rtgui_dc_get_visible
(
self
))
return
;
/* get owner */
owner
=
RTGUI_CONTAINER_OF
(
self
,
struct
rtgui_widget
,
dc_type
);
...
...
@@ -312,8 +320,8 @@ static void rtgui_dc_client_blit_line(struct rtgui_dc *self, int x1, int x2, int
hw_driver
->
ops
->
draw_raw_hline
(
line_data
+
offset
,
x1
,
x2
,
y
);
}
else
{
for
(
index
=
0
;
index
<
rtgui_region_num_rects
(
&
(
owner
->
clip
));
index
++
)
{
for
(
index
=
0
;
index
<
rtgui_region_num_rects
(
&
(
owner
->
clip
));
index
++
)
{
rtgui_rect_t
*
prect
;
register
rt_base_t
draw_x1
,
draw_x2
;
...
...
components/gui/src/dc_hw.c
浏览文件 @
01108b52
/*
* File : dc_hw.c
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2009-10-16 Bernard first version
*/
#include <rtgui/dc.h>
#include <rtgui/dc_hw.h>
#include <rtgui/driver.h>
#include <rtgui/rtgui_system.h>
#include <rtgui/rtgui_app.h>
...
...
@@ -54,17 +63,17 @@ struct rtgui_dc *rtgui_dc_hw_create(rtgui_widget_t *owner)
/* create DC */
dc
=
(
struct
rtgui_dc_hw
*
)
rtgui_malloc
(
sizeof
(
struct
rtgui_dc_hw
));
if
(
dc
)
{
dc
->
parent
.
type
=
RTGUI_DC_HW
;
dc
->
parent
.
engine
=
&
dc_hw_engine
;
dc
->
owner
=
owner
;
dc
->
hw_driver
=
rtgui_graphic_driver_get_default
();
if
(
dc
)
{
dc
->
parent
.
type
=
RTGUI_DC_HW
;
dc
->
parent
.
engine
=
&
dc_hw_engine
;
dc
->
owner
=
owner
;
dc
->
hw_driver
=
rtgui_graphic_driver_get_default
();
return
&
(
dc
->
parent
);
}
return
&
(
dc
->
parent
);
}
return
RT_NULL
;
return
RT_NULL
;
}
static
rt_bool_t
rtgui_dc_hw_fini
(
struct
rtgui_dc
*
dc
)
...
...
components/gui/src/dc_rotozoom.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/dc_trans.c
浏览文件 @
01108b52
/*
* File : dc_trans.c
* This file is part of RT-Thread GUI
* COPYRIGHT (C) 2006 - 2014, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2014-03-15 Grissom The first version
*/
#include <rtgui/rtgui.h>
#include <rtgui/rtgui_system.h>
#include <rtgui/dc.h>
...
...
@@ -91,7 +115,7 @@ void rtgui_dc_trans_get_new_wh(struct rtgui_dc_trans *dct,
&
dct
->
m
);
/* Transform result of (w, 0). */
rtgui_matrix_mul_point_nomove
(
&
bottomright
,
rect
.
x2
,
0
,
&
dct
->
m
);
rect
.
x2
,
0
,
&
dct
->
m
);
/* Transform result of (0, 0) is always (0, 0). */
#define NORMALIZE(x) do { if (x < 0) x = 0; } while (0)
...
...
@@ -105,7 +129,7 @@ void rtgui_dc_trans_get_new_wh(struct rtgui_dc_trans *dct,
NORMALIZE
(
bottomright
.
x
);
neww
=
_UI_MAX
(
topright
.
x
,
_UI_ABS
(
topleft
.
x
-
bottomright
.
x
))
+
dct
->
m
.
m
[
4
];
+
dct
->
m
.
m
[
4
];
NORMALIZE
(
neww
);
*
new_wp
=
neww
;
...
...
@@ -119,7 +143,7 @@ void rtgui_dc_trans_get_new_wh(struct rtgui_dc_trans *dct,
NORMALIZE
(
bottomright
.
y
);
newh
=
_UI_MAX
(
topright
.
y
,
_UI_ABS
(
topleft
.
y
-
bottomright
.
y
))
+
dct
->
m
.
m
[
5
];
+
dct
->
m
.
m
[
5
];
NORMALIZE
(
newh
);
*
new_hp
=
newh
;
...
...
@@ -444,9 +468,9 @@ static void _blit_rotate_FR2FR_SF4B_AA(struct _fb_rect* RTGUI_RESTRICT src,
/* FrameRect to FrameRect, from ARGB8888 to RGB565. */
static
void
_blit_rotate_FR2FR_ARGB2RGB565
(
struct
_fb_rect
*
RTGUI_RESTRICT
src
,
const
struct
rtgui_point
*
dc_point
,
struct
_fb_rect
*
RTGUI_RESTRICT
dst
,
const
struct
rtgui_matrix
*
invm
)
const
struct
rtgui_point
*
dc_point
,
struct
_fb_rect
*
RTGUI_RESTRICT
dst
,
const
struct
rtgui_matrix
*
invm
)
{
rt_uint32_t
*
RTGUI_RESTRICT
srcp
=
(
rt_uint32_t
*
)
src
->
fb
;
rt_uint16_t
*
RTGUI_RESTRICT
dstp
=
(
rt_uint16_t
*
)
dst
->
fb
;
...
...
@@ -505,7 +529,7 @@ static void _blit_rotate_FR2FR_ARGB2RGB565(struct _fb_rect* RTGUI_RESTRICT src,
* and blend all components at the same time
*/
op
=
((
op
&
0xfc00
)
<<
11
)
+
(
op
>>
8
&
0xf800
)
+
(
op
>>
3
&
0x1f
);
+
(
op
>>
3
&
0x1f
);
d
=
(
d
|
d
<<
16
)
&
0x07e0f81f
;
d
+=
(
op
-
d
)
*
alpha
>>
5
;
d
&=
0x07e0f81f
;
...
...
@@ -518,9 +542,9 @@ static void _blit_rotate_FR2FR_ARGB2RGB565(struct _fb_rect* RTGUI_RESTRICT src,
/* FrameRect to FrameRect, from ARGB8888 to RGB565. */
static
void
_blit_rotate_FR2FR_ARGB2RGB565_AA
(
struct
_fb_rect
*
RTGUI_RESTRICT
src
,
const
struct
rtgui_point
*
dc_point
,
struct
_fb_rect
*
RTGUI_RESTRICT
dst
,
const
struct
rtgui_matrix
*
invm
)
const
struct
rtgui_point
*
dc_point
,
struct
_fb_rect
*
RTGUI_RESTRICT
dst
,
const
struct
rtgui_matrix
*
invm
)
{
rt_uint32_t
*
RTGUI_RESTRICT
srcp
=
(
rt_uint32_t
*
)
src
->
fb
;
rt_uint16_t
*
RTGUI_RESTRICT
dstp
=
(
rt_uint16_t
*
)
dst
->
fb
;
...
...
@@ -646,7 +670,8 @@ static void _blit_rotate_B2B(struct rtgui_dc_trans *dct,
if
(
dc
->
pixel_format
==
dest
->
pixel_format
)
{
switch
(
rtgui_color_get_bpp
(
dest
->
pixel_format
))
{
switch
(
rtgui_color_get_bpp
(
dest
->
pixel_format
))
{
case
2
:
if
(
dct
->
use_aa
)
_blit_rotate_FR2FR_SF2B_AA
(
&
srcfb
,
dc_point
,
...
...
@@ -724,7 +749,8 @@ static void _blit_rotate_B2H(struct rtgui_dc_trans *dct,
if
(
dc
->
pixel_format
==
dest
->
hw_driver
->
pixel_format
)
{
switch
(
rtgui_color_get_bpp
(
dest
->
hw_driver
->
pixel_format
))
{
switch
(
rtgui_color_get_bpp
(
dest
->
hw_driver
->
pixel_format
))
{
case
2
:
if
(
dct
->
use_aa
)
_blit_rotate_FR2FR_SF2B_AA
(
&
srcfb
,
dc_point
,
...
...
@@ -820,13 +846,13 @@ void rtgui_dc_trans_blit(struct rtgui_dc_trans *dct,
if
(
dct
->
owner
->
type
==
RTGUI_DC_BUFFER
)
{
if
(
dest
->
type
==
RTGUI_DC_BUFFER
)
_blit_rotate_B2B
(
dct
,
dc_point
,
(
struct
rtgui_dc_buffer
*
)
dest
,
rect
,
&
invm
,
neww
,
newh
);
_blit_rotate_B2B
(
dct
,
dc_point
,
(
struct
rtgui_dc_buffer
*
)
dest
,
rect
,
&
invm
,
neww
,
newh
);
else
if
(
dest
->
type
==
RTGUI_DC_HW
)
_blit_rotate_B2H
(
dct
,
dc_point
,
(
struct
rtgui_dc_hw
*
)
dest
,
rect
,
&
invm
,
neww
,
newh
);
_blit_rotate_B2H
(
dct
,
dc_point
,
(
struct
rtgui_dc_hw
*
)
dest
,
rect
,
&
invm
,
neww
,
newh
);
else
if
(
dest
->
type
==
RTGUI_DC_CLIENT
)
// TODO:
;
...
...
components/gui/src/filerw.c
浏览文件 @
01108b52
/*
* File : filerw.c
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/src/font.c
浏览文件 @
01108b52
/*
* File : font.c
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -99,6 +109,16 @@ struct rtgui_font *rtgui_font_refer(const char *family, rt_uint16_t height)
}
}
rtgui_list_foreach
(
node
,
&
_rtgui_font_list
)
{
font
=
rtgui_list_entry
(
node
,
struct
rtgui_font
,
list
);
if
(
rt_strncmp
(
font
->
family
,
family
,
RTGUI_NAME_MAX
)
==
0
)
{
font
->
refer_count
++
;
return
font
;
}
}
return
RT_NULL
;
}
RTM_EXPORT
(
rtgui_font_refer
);
...
...
components/gui/src/font_bmp.c
浏览文件 @
01108b52
/*
* File : font.c
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 201
0
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 201
7
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -34,15 +44,15 @@ void rtgui_bitmap_font_draw_char(struct rtgui_font_bitmap *font, struct rtgui_dc
const
rt_uint8_t
*
font_ptr
;
int
x
,
y
,
w
,
h
,
style
;
register
rt_base_t
i
,
j
,
/*k,*/
word_bytes
;
struct
rtgui_rect
dc_rect
;
struct
rtgui_rect
dc_rect
;
/* check first and last char */
if
(
ch
<
font
->
first_char
||
ch
>
font
->
last_char
)
return
;
/* get text style */
style
=
rtgui_dc_get_gc
(
dc
)
->
textstyle
;
bc
=
rtgui_dc_get_gc
(
dc
)
->
background
;
rtgui_dc_get_rect
(
dc
,
&
dc_rect
);
rtgui_dc_get_rect
(
dc
,
&
dc_rect
);
x
=
rect
->
x1
;
y
=
rect
->
y1
;
...
...
@@ -65,8 +75,8 @@ void rtgui_bitmap_font_draw_char(struct rtgui_font_bitmap *font, struct rtgui_dc
rt_uint8_t
chr
=
0
;
const
rt_uint8_t
*
ptr
=
font_ptr
+
i
*
word_bytes
;
if
((
i
+
y
)
>=
dc_rect
.
y2
)
continue
;
if
((
i
+
y
)
<
0
)
continue
;
if
((
i
+
y
)
>=
dc_rect
.
y2
)
continue
;
if
((
i
+
y
)
<
0
)
continue
;
for
(
j
=
0
;
j
<
w
;
j
++
)
{
...
...
@@ -92,7 +102,7 @@ static void rtgui_bitmap_font_draw_text(struct rtgui_font *font, struct rtgui_dc
RT_ASSERT
(
bmp_font
!=
RT_NULL
);
/* parameter check */
/* parameter check */
if
(
rect
->
y1
>
rect
->
y2
)
return
;
#ifdef RTGUI_USING_FONTHZ
...
...
components/gui/src/font_fnt.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/font_freetype.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/font_hz_bmp.c
浏览文件 @
01108b52
/*
* File : font_hz_bmp.c
* This file is part of RT-Thread GUI Engine
* COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2010-09-15 Bernard first version
*/
#include <rtgui/dc.h>
#include <rtgui/font.h>
...
...
components/gui/src/font_hz_file.c
浏览文件 @
01108b52
/*
* File : font_hz_file.c
* This file is part of RT-Thread GUI Engine
* COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2010-09-15 Bernard first version
*/
/*
* Cached HZ font engine
*/
...
...
components/gui/src/hz12font.c
浏览文件 @
01108b52
/*
* File : hz12font.c
* This file is part of RT-Thread GUI Engine
* COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2010-09-15 Bernard first version
*/
#include <rtgui/font.h>
#if defined(RTGUI_USING_FONT12) && defined(RTGUI_USING_FONTHZ)
components/gui/src/hz16font.c
浏览文件 @
01108b52
/*
* File : hz16font.c
* This file is part of RT-Thread GUI Engine
* COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2010-09-15 Bernard first version
*/
#include <rtgui/font.h>
#if defined(RTGUI_USING_FONT16) && defined(RTGUI_USING_FONTHZ)
components/gui/src/image.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/image_bmp.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/image_container.c
0 → 100644
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/image_hdc.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/image_jpg.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/image_png.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/image_xpm.c
浏览文件 @
01108b52
/*
* File : image_xpm.c
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -15,7 +25,6 @@
#include <string.h>
#include <rtgui/filerw.h>
#include <rtgui/image_xpm.h>
#include <rtgui/rtgui_system.h>
#ifdef RTGUI_IMAGE_XPM
...
...
components/gui/src/matrix.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/mouse.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/mouse.h
浏览文件 @
01108b52
/*
* File : mouse.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/src/region.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/rtgui_app.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/rtgui_driver.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/rtgui_object.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/rtgui_system.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/server.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/title.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/topwin.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/topwin.h
浏览文件 @
01108b52
/*
* File : topwin.h
* This file is part of RT-Thread
RTOS
* COPYRIGHT (C) 2006 - 20
09
, RT-Thread Development Team
* This file is part of RT-Thread
GUI Engine
* COPYRIGHT (C) 2006 - 20
17
, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/gui/src/widget.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
components/gui/src/window.c
浏览文件 @
01108b52
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录