summaryrefslogtreecommitdiff
path: root/components/rtgui/include
diff options
context:
space:
mode:
Diffstat (limited to 'components/rtgui/include')
-rw-r--r--components/rtgui/include/rtgui/event.h14
-rw-r--r--components/rtgui/include/rtgui/widgets/widget.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/components/rtgui/include/rtgui/event.h b/components/rtgui/include/rtgui/event.h
index 2a06f1850f..5acdf6225f 100644
--- a/components/rtgui/include/rtgui/event.h
+++ b/components/rtgui/include/rtgui/event.h
@@ -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;
diff --git a/components/rtgui/include/rtgui/widgets/widget.h b/components/rtgui/include/rtgui/widgets/widget.h
index 9b8fd439e9..e588df166f 100644
--- a/components/rtgui/include/rtgui/widgets/widget.h
+++ b/components/rtgui/include/rtgui/widgets/widget.h
@@ -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);