diff options
| author | bernard.xiong <[email protected]> | 2010-01-27 09:40:02 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-01-27 09:40:02 +0000 |
| commit | 646db738d5f2a5201f41a04e850144329e855fac (patch) | |
| tree | a67d375d8faa1d4975369cb2f3320162730ff164 /rtgui | |
| parent | 5805cbfd3324c3722a1b46d08a89473bbc9a7bb5 (diff) | |
fix clip info event in small size mode.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@343 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'rtgui')
| -rw-r--r-- | rtgui/SConscript | 1 | ||||
| -rw-r--r-- | rtgui/common/rtgui_system.c | 7 | ||||
| -rw-r--r-- | rtgui/include/rtgui/event.h | 3 | ||||
| -rw-r--r-- | rtgui/include/rtgui/rtgui_config.h | 6 | ||||
| -rw-r--r-- | rtgui/server/topwin.c | 4 | ||||
| -rw-r--r-- | rtgui/widgets/filelist_view.c | 2 | ||||
| -rw-r--r-- | rtgui/widgets/window.c | 1 | ||||
| -rw-r--r-- | rtgui/widgets/workbench.c | 1 |
8 files changed, 15 insertions, 10 deletions
diff --git a/rtgui/SConscript b/rtgui/SConscript index 531ce750bf..8d8473d03c 100644 --- a/rtgui/SConscript +++ b/rtgui/SConscript @@ -41,6 +41,7 @@ widgets/container.c widgets/iconbox.c
widgets/label.c
widgets/progressbar.c
+widgets/radiobox.c
widgets/slider.c
widgets/staticline.c
widgets/textbox.c
diff --git a/rtgui/common/rtgui_system.c b/rtgui/common/rtgui_system.c index d56c1220f0..ffbf50c109 100644 --- a/rtgui/common/rtgui_system.c +++ b/rtgui/common/rtgui_system.c @@ -131,6 +131,9 @@ static void rtgui_event_dump(rt_thread_t tid, rtgui_event_t* event) if(info->wid != RT_NULL) rt_kprintf("win: %s", info->wid->title); +#ifdef RTGUI_USING_SMALL_SIZE + rt_kprintf(" clip no. %d", info->num_rect); +#endif } break; @@ -325,6 +328,8 @@ rt_err_t rtgui_thread_send(rt_thread_t tid, rtgui_event_t* event, rt_size_t even struct rtgui_thread* thread; rtgui_event_dump(tid, event); + if (event->type != RTGUI_EVENT_TIMER) + rt_kprintf("event size: %d\n", event_size); /* find rtgui_thread */ thread = (struct rtgui_thread*) (tid->user_data); @@ -338,6 +343,7 @@ rt_err_t rtgui_thread_send_urgent(rt_thread_t tid, rtgui_event_t* event, rt_size struct rtgui_thread* thread; rtgui_event_dump(tid, event); + rt_kprintf("event size: %d\n", event_size); /* find rtgui_thread */ thread = (struct rtgui_thread*) (tid->user_data); @@ -354,6 +360,7 @@ rt_err_t rtgui_thread_send_sync(rt_thread_t tid, rtgui_event_t* event, rt_size_t struct rt_mailbox ack_mb; rtgui_event_dump(tid, event); + rt_kprintf("event size: %d\n", event_size); /* init ack mailbox */ r = rt_mb_init(&ack_mb, "ack", &ack_buffer, 1, 0); diff --git a/rtgui/include/rtgui/event.h b/rtgui/include/rtgui/event.h index 206a7171d5..50ad4887e2 100644 --- a/rtgui/include/rtgui/event.h +++ b/rtgui/include/rtgui/event.h @@ -172,9 +172,6 @@ struct rtgui_event_win_create {
struct rtgui_event parent;
- /* the window event mask */
- rt_uint32_t mask;
-
/* the window flag */
rt_uint32_t flag;
diff --git a/rtgui/include/rtgui/rtgui_config.h b/rtgui/include/rtgui/rtgui_config.h index 65e6c40b90..7c1eee618c 100644 --- a/rtgui/include/rtgui/rtgui_config.h +++ b/rtgui/include/rtgui/rtgui_config.h @@ -18,19 +18,17 @@ /* RTGUI options */
/* name length of RTGUI object */
-#define RTGUI_NAME_MAX 16
+#define RTGUI_NAME_MAX 12
/* #define RTGUI_USING_MOUSE_CURSOR */
-// #define RTGUI_USING_FONT12
-
#define RTGUI_USING_FONT16
#define RTGUI_USING_FONTHZ
#ifdef _WIN32
#define RTGUI_USING_STDIO_FILERW
#define RTGUI_IMAGE_PNG
-#define RTGUI_IMAGE_JPG
+#define RTGUI_IMAGE_JPEG
#define RTGUI_USING_FONT12
#else
diff --git a/rtgui/server/topwin.c b/rtgui/server/topwin.c index f987880132..dc0fd1480b 100644 --- a/rtgui/server/topwin.c +++ b/rtgui/server/topwin.c @@ -75,7 +75,6 @@ rt_err_t rtgui_topwin_add(struct rtgui_event_win_create* event) topwin->wid = event->wid; topwin->extent = event->extent; topwin->tid = event->parent.sender; - topwin->mask = event->mask; topwin->flag = 0; if (event->flag & RTGUI_WIN_STYLE_NO_TITLE) topwin->flag |= WINTITLE_NO; @@ -279,6 +278,7 @@ void rtgui_topwin_raise(struct rtgui_win* wid, rt_thread_t sender) rt_int32_t count; struct rtgui_list_node* node; struct rtgui_event_clip_info eclip; + RTGUI_EVENT_CLIP_INFO_INIT(&eclip); /* the window is already placed in front */ if (&(topwin->list) == _rtgui_topwin_show_list.next) @@ -741,6 +741,8 @@ static void rtgui_topwin_update_clip() struct rtgui_event_clip_info eclip; struct rtgui_list_node* node = _rtgui_topwin_show_list.next; + RTGUI_EVENT_CLIP_INFO_INIT(&eclip); + rtgui_list_foreach(node, &_rtgui_topwin_show_list) { struct rtgui_topwin* wnd; diff --git a/rtgui/widgets/filelist_view.c b/rtgui/widgets/filelist_view.c index 75b75ac8f1..406029ed9f 100644 --- a/rtgui/widgets/filelist_view.c +++ b/rtgui/widgets/filelist_view.c @@ -688,6 +688,6 @@ void rtgui_filelist_get_fullpath(rtgui_filelist_view_t* view, char* path, rt_siz {
RT_ASSERT(view != RT_NULL);
- rt_sprintf(path, "%s/%s", view->current_directory,
+ rt_sprintf(path, "%s%c%s", view->current_directory, PATH_SEPARATOR,
view->items[view->current_item].name);
}
\ No newline at end of file diff --git a/rtgui/widgets/window.c b/rtgui/widgets/window.c index 32e95a2ffd..33b51126d4 100644 --- a/rtgui/widgets/window.c +++ b/rtgui/widgets/window.c @@ -80,7 +80,6 @@ static rt_bool_t _rtgui_win_create_in_server(rtgui_win_t* win) ecreate.wid = win; ecreate.extent = RTGUI_WIDGET(win)->extent; ecreate.flag = win->style; - ecreate.mask = 0; rt_strncpy((char*)ecreate.title, (char*)win->title, RTGUI_NAME_MAX); if (rtgui_thread_send_sync(server, RTGUI_EVENT(&ecreate), diff --git a/rtgui/widgets/workbench.c b/rtgui/widgets/workbench.c index a8d52b8484..5ac2cd2452 100644 --- a/rtgui/widgets/workbench.c +++ b/rtgui/widgets/workbench.c @@ -24,6 +24,7 @@ static void _rtgui_workbench_constructor(rtgui_workbench_t *workbench) workbench->panel = RT_NULL; workbench->flag = RTGUI_WORKBENCH_FLAG_DEFAULT; workbench->modal_code = RTGUI_MODAL_OK; + workbench->title = RT_NULL; workbench->current_view = RT_NULL; } |
