diff --git a/rtgui/SConscript b/rtgui/SConscript index 531ce750bf3a0e800ada98a9ceffe89de95b8c6d..8d8473d03caf5ca6baf8fc7065b2dcb94a434212 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 d56c1220f0c4bab16b13bd686dcd826687f18d50..ffbf50c109cc43cd37fbe545196947532fdc1ce6 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 206a7171d5bd8559e20927a05c3b54123d654553..50ad4887e2d18b161838a6f724c1203ca4247943 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 65e6c40b90b1cd6552c96d9cd2a6deaa6c3ea1c6..7c1eee618c556a9f656534492bdea9f04c7fd4af 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 f9878801324383ac23e17cc6487c3161b5ddb587..dc0fd1480b3aa671531f6bec79b0f6d9b4280368 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 75b75ac8f15c6b9e58636eeb6b91e091d6dc18e2..406029ed9fa6630bff5565af164246c9a3f3ffce 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 32e95a2ffd0e5dcf8ac159497a353e0fc112412f..33b51126d4d05975a808b68679ccafc9ee5d1aa4 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 a8d52b84848b597c332f0fd0b6e155ad4959c5a7..5ac2cd24527b99dfc13b3fe9ee58bff6ce44b373 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; }