diff options
| author | [email protected] <[email protected]> | 2012-07-21 12:18:51 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-07-21 12:18:51 +0000 |
| commit | f2503a770fdacdc01a68bfa638e9b40a7121644d (patch) | |
| tree | 528c7b0e4f26e586ea5aba2f5f7c0dae7bd30d63 /components/rtgui/include | |
| parent | 8c0310450783ed9028221168e60551554fbee8d2 (diff) | |
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
Diffstat (limited to 'components/rtgui/include')
| -rw-r--r-- | components/rtgui/include/rtgui/event.h | 14 | ||||
| -rw-r--r-- | components/rtgui/include/rtgui/widgets/widget.h | 1 |
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); |
