mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-27 09:32:28 +08:00
gui 引擎代码更新;
This commit is contained in:
@@ -121,6 +121,8 @@ struct rtgui_dc_buffer
|
||||
struct rtgui_image_item *image_item;
|
||||
#endif
|
||||
|
||||
/* pixel alpha */
|
||||
rt_uint8_t pixel_alpha;
|
||||
/* pixel data */
|
||||
rt_uint8_t *pixel;
|
||||
};
|
||||
@@ -138,6 +140,7 @@ struct rtgui_dc *rtgui_img_dc_create_pixformat(rt_uint8_t pixel_format, rt_uint8
|
||||
struct rtgui_image_item *image_item);
|
||||
#endif
|
||||
struct rtgui_dc *rtgui_dc_buffer_create_from_dc(struct rtgui_dc* dc);
|
||||
void rtgui_dc_buffer_set_alpha(struct rtgui_dc* dc, rt_uint8_t pixel_alpha);
|
||||
|
||||
/* create a widget dc */
|
||||
struct rtgui_dc *rtgui_dc_widget_create(struct rtgui_widget * owner);
|
||||
|
||||
@@ -329,6 +329,7 @@ enum rtgui_gesture_type
|
||||
RTGUI_GESTURE_PINCH = 0x0002,
|
||||
RTGUI_GESTURE_DRAG = 0x0004,
|
||||
RTGUI_GESTURE_LONGPRESS = 0x0008,
|
||||
RTGUI_GESTURE_DRAGGED = 0x0001 | 0x0004 | 0x0008,
|
||||
/* PINCH, DRAG finished. */
|
||||
RTGUI_GESTURE_FINISH = 0x8000,
|
||||
/* The corresponding gesture should be canceled. */
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <rtgui/dc.h>
|
||||
#include <rtgui/font.h>
|
||||
#include <rtgui/filerw.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -99,9 +99,9 @@ int rtgui_region_is_flat(rtgui_region_t *region);
|
||||
/* rect functions */
|
||||
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_move(rtgui_rect_t *rect, int x, int y);
|
||||
void rtgui_rect_move_to_point(rtgui_rect_t *rect, int x, int y);
|
||||
void rtgui_rect_move_to_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);
|
||||
int rtgui_rect_contains_point(const rtgui_rect_t *rect, int x, int y);
|
||||
|
||||
@@ -158,6 +158,7 @@ enum RTGUI_ALIGN
|
||||
RTGUI_ALIGN_CENTER = RTGUI_ALIGN_CENTER_HORIZONTAL | RTGUI_ALIGN_CENTER_VERTICAL,
|
||||
RTGUI_ALIGN_EXPAND = 0x10,
|
||||
RTGUI_ALIGN_STRETCH = 0x20,
|
||||
RTGUI_ALIGN_TTF_SIZE = 0x40,
|
||||
};
|
||||
|
||||
enum RTGUI_TEXTSTYLE
|
||||
@@ -172,7 +173,7 @@ enum RTGUI_MODAL_CODE
|
||||
{
|
||||
RTGUI_MODAL_OK,
|
||||
RTGUI_MODAL_CANCEL,
|
||||
RTGUI_MODAL_MAX = 0xFFFF,
|
||||
RTGUI_MODAL_MAX = 0xFFFFFFFF,
|
||||
};
|
||||
typedef enum RTGUI_MODAL_CODE rtgui_modal_code_t;
|
||||
|
||||
|
||||
@@ -88,6 +88,9 @@ struct rtgui_win
|
||||
/* inherit from container */
|
||||
rtgui_container_t parent;
|
||||
|
||||
/* update count */
|
||||
rt_base_t update;
|
||||
|
||||
/* drawing count */
|
||||
rt_base_t drawing;
|
||||
struct rtgui_rect drawing_rect;
|
||||
@@ -137,6 +140,11 @@ struct rtgui_win
|
||||
|
||||
/* Private data. */
|
||||
rt_base_t (*_do_show)(struct rtgui_win *win);
|
||||
|
||||
/* app ref_count */
|
||||
rt_uint16_t app_ref_count;
|
||||
/* win magic flag, magic value is 0xA5A55A5A */
|
||||
rt_uint32_t magic;
|
||||
};
|
||||
|
||||
rtgui_win_t *rtgui_win_create(struct rtgui_win *parent_window, const char *title,
|
||||
|
||||
Reference in New Issue
Block a user