mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-22 03:09:16 +08:00
sync with github 5892d5b7
Add update_toplevel event. As always, full log is in GitHub. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2224 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -52,6 +52,7 @@ enum _rtgui_event_type
|
||||
RTGUI_EVENT_HIDE, /* the widget is going to be hidden */
|
||||
RTGUI_EVENT_PAINT, /* paint on screen */
|
||||
RTGUI_EVENT_TIMER, /* timer */
|
||||
RTGUI_EVENT_UPDATE_TOPLVL, /* update the toplevel */
|
||||
|
||||
/* clip rect information */
|
||||
RTGUI_EVENT_CLIP_INFO, /* clip rect info */
|
||||
@@ -255,6 +256,18 @@ struct rtgui_event_clip_info
|
||||
#define RTGUI_EVENT_SHOW_INIT(e) RTGUI_EVENT_INIT((e), RTGUI_EVENT_SHOW)
|
||||
#define RTGUI_EVENT_HIDE_INIT(e) RTGUI_EVENT_INIT((e), RTGUI_EVENT_HIDE)
|
||||
|
||||
struct rtgui_event_update_toplvl
|
||||
{
|
||||
struct rtgui_event parent;
|
||||
struct rtgui_win *toplvl;
|
||||
};
|
||||
|
||||
#define RTGUI_EVENT_UPDATE_TOPLVL_INIT(e) \
|
||||
do { \
|
||||
RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_UPDATE_TOPLVL); \
|
||||
(e)->toplvl = RT_NULL; \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* RTGUI Mouse and Keyboard Event
|
||||
*/
|
||||
@@ -388,6 +401,7 @@ union rtgui_event_generic
|
||||
struct rtgui_event_monitor monitor;
|
||||
struct rtgui_event_paint paint;
|
||||
struct rtgui_event_timer timer;
|
||||
struct rtgui_event_update_toplvl update_toplvl;
|
||||
struct rtgui_event_clip_info clip_info;
|
||||
struct rtgui_event_mouse mouse;
|
||||
struct rtgui_event_kbd kbd;
|
||||
|
||||
@@ -184,6 +184,7 @@ void rtgui_widget_update_clip(rtgui_widget_t* widget);
|
||||
|
||||
/* get the toplevel widget of widget */
|
||||
struct rtgui_win* rtgui_widget_get_toplevel(rtgui_widget_t* widget);
|
||||
rt_bool_t rtgui_widget_onupdate_toplvl(struct rtgui_object *object, struct rtgui_event *event);
|
||||
|
||||
void rtgui_widget_show(rtgui_widget_t* widget);
|
||||
rt_bool_t rtgui_widget_onshow(struct rtgui_object *object, struct rtgui_event *event);
|
||||
|
||||
Reference in New Issue
Block a user