From 2e1de690f2dddd53a925290b35f959162dbbf74a Mon Sep 17 00:00:00 2001 From: "goprife@gmail.com" Date: Thu, 27 Dec 2012 08:21:30 +0000 Subject: [PATCH] remove realtouch ui, then move snake to rtgui_demo git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2534 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/simulator/applications/application.c | 2 +- bsp/simulator/rtconfig.h | 12 +- bsp/simulator/rtgui_demo/SConscript | 12 + .../{ => rtgui_demo}/snake/SConscript | 0 bsp/simulator/{ => rtgui_demo}/snake/snake.c | 0 bsp/simulator/{ => rtgui_demo}/snake/snake.h | 0 .../{ => rtgui_demo}/snake/snake_gui.c | 3 + bsp/simulator/ui/SConscript | 8 - bsp/simulator/ui/application.cc | 31 -- bsp/simulator/ui/appmgr.c | 133 -------- bsp/simulator/ui/appmgr.h | 12 - bsp/simulator/ui/apps_list.c | 268 --------------- bsp/simulator/ui/apps_list.h | 11 - bsp/simulator/ui/block_panel.c | 118 ------- bsp/simulator/ui/block_panel.h | 32 -- bsp/simulator/ui/calibration.cc | 322 ------------------ bsp/simulator/ui/ex_app.c | 57 ---- bsp/simulator/ui/picture.c | 248 -------------- bsp/simulator/ui/program.cc | 187 ---------- bsp/simulator/ui/realtouch_ui.c | 33 -- bsp/simulator/ui/statusbar.c | 166 --------- bsp/simulator/ui/statusbar.h | 13 - bsp/simulator/ui/xpm/close.xpm | 188 ---------- bsp/simulator/ui/xpm/exec.xpm | 93 ----- bsp/simulator/ui/xpm/home.xpm | 196 ----------- bsp/simulator/ui/xpm/home_gray.xpm | 224 ------------ bsp/simulator/ui/xpm/start.xpm | 310 ----------------- 27 files changed, 22 insertions(+), 2657 deletions(-) create mode 100644 bsp/simulator/rtgui_demo/SConscript rename bsp/simulator/{ => rtgui_demo}/snake/SConscript (100%) rename bsp/simulator/{ => rtgui_demo}/snake/snake.c (100%) rename bsp/simulator/{ => rtgui_demo}/snake/snake.h (100%) rename bsp/simulator/{ => rtgui_demo}/snake/snake_gui.c (95%) delete mode 100644 bsp/simulator/ui/SConscript delete mode 100644 bsp/simulator/ui/application.cc delete mode 100644 bsp/simulator/ui/appmgr.c delete mode 100644 bsp/simulator/ui/appmgr.h delete mode 100644 bsp/simulator/ui/apps_list.c delete mode 100644 bsp/simulator/ui/apps_list.h delete mode 100644 bsp/simulator/ui/block_panel.c delete mode 100644 bsp/simulator/ui/block_panel.h delete mode 100644 bsp/simulator/ui/calibration.cc delete mode 100644 bsp/simulator/ui/ex_app.c delete mode 100644 bsp/simulator/ui/picture.c delete mode 100644 bsp/simulator/ui/program.cc delete mode 100644 bsp/simulator/ui/realtouch_ui.c delete mode 100644 bsp/simulator/ui/statusbar.c delete mode 100644 bsp/simulator/ui/statusbar.h delete mode 100644 bsp/simulator/ui/xpm/close.xpm delete mode 100644 bsp/simulator/ui/xpm/exec.xpm delete mode 100644 bsp/simulator/ui/xpm/home.xpm delete mode 100644 bsp/simulator/ui/xpm/home_gray.xpm delete mode 100644 bsp/simulator/ui/xpm/start.xpm diff --git a/bsp/simulator/applications/application.c b/bsp/simulator/applications/application.c index f2319aa6b..ce30ff9d7 100644 --- a/bsp/simulator/applications/application.c +++ b/bsp/simulator/applications/application.c @@ -85,7 +85,7 @@ void rt_init_thread_entry(void *parameter) #if defined(RT_USING_RTGUI) rt_thread_delay(3000); - realtouch_ui_init(); + snake_main(); #endif } diff --git a/bsp/simulator/rtconfig.h b/bsp/simulator/rtconfig.h index e84b5bc75..0d885851b 100644 --- a/bsp/simulator/rtconfig.h +++ b/bsp/simulator/rtconfig.h @@ -37,9 +37,9 @@ /* Using Software Timer */ /* #define RT_USING_TIMER_SOFT */ -//#define RT_TIMER_THREAD_PRIO 4 -//#define RT_TIMER_THREAD_STACK_SIZE 512 -//#define RT_TIMER_TICK_PER_SECOND 10 +#define RT_TIMER_THREAD_PRIO 4 +#define RT_TIMER_THREAD_STACK_SIZE 512 +#define RT_TIMER_TICK_PER_SECOND 10 /* SECTION: IPC */ /* Using Semaphore*/ @@ -196,7 +196,7 @@ /* use DFS as file interface */ #define RTGUI_USING_DFS_FILERW /* use font file as Chinese font */ -//#define RTGUI_USING_HZ_FILE +/* #define RTGUI_USING_HZ_FILE */ /* use Chinese bitmap font */ #define RTGUI_USING_HZ_BMP /* use small size in RTGUI */ @@ -209,8 +209,8 @@ /* image support */ #define RTGUI_IMAGE_XPM #define RTGUI_IMAGE_BMP -//#define RTGUI_IMAGE_JPEG -//#define RTGUI_IMAGE_PNG +/* #define RTGUI_IMAGE_JPEG */ +/* #define RTGUI_IMAGE_PNG */ #define RTGUI_USING_NOTEBOOK_IMAGE #endif diff --git a/bsp/simulator/rtgui_demo/SConscript b/bsp/simulator/rtgui_demo/SConscript new file mode 100644 index 000000000..d9c64eb9f --- /dev/null +++ b/bsp/simulator/rtgui_demo/SConscript @@ -0,0 +1,12 @@ +from building import * + +cwd = GetCurrentDir() +objs = [] +list = os.listdir(cwd) + +for d in list: + path = os.path.join(cwd, d) + if os.path.isfile(os.path.join(path, 'SConscript')): + objs = objs + SConscript(os.path.join(d, 'SConscript')) + +Return('objs') diff --git a/bsp/simulator/snake/SConscript b/bsp/simulator/rtgui_demo/snake/SConscript similarity index 100% rename from bsp/simulator/snake/SConscript rename to bsp/simulator/rtgui_demo/snake/SConscript diff --git a/bsp/simulator/snake/snake.c b/bsp/simulator/rtgui_demo/snake/snake.c similarity index 100% rename from bsp/simulator/snake/snake.c rename to bsp/simulator/rtgui_demo/snake/snake.c diff --git a/bsp/simulator/snake/snake.h b/bsp/simulator/rtgui_demo/snake/snake.h similarity index 100% rename from bsp/simulator/snake/snake.h rename to bsp/simulator/rtgui_demo/snake/snake.h diff --git a/bsp/simulator/snake/snake_gui.c b/bsp/simulator/rtgui_demo/snake/snake_gui.c similarity index 95% rename from bsp/simulator/snake/snake_gui.c rename to bsp/simulator/rtgui_demo/snake/snake_gui.c index 6e0ba91cd..9425513ca 100644 --- a/bsp/simulator/snake/snake_gui.c +++ b/bsp/simulator/rtgui_demo/snake/snake_gui.c @@ -364,10 +364,13 @@ void snake_main(void) { struct rtgui_app* application; struct rtgui_win* win; + rtgui_rect_t rect; application = rtgui_app_create(rt_thread_self(), "sanke_app"); if (application != RT_NULL) { + rtgui_get_screen_rect(&rect); + rtgui_set_mainwin_rect(&rect); win = rtgui_mainwin_create(RT_NULL, "sanke_win", RTGUI_WIN_STYLE_MAINWIN | RTGUI_WIN_STYLE_DESTROY_ON_CLOSE); diff --git a/bsp/simulator/ui/SConscript b/bsp/simulator/ui/SConscript deleted file mode 100644 index 99cbb42bb..000000000 --- a/bsp/simulator/ui/SConscript +++ /dev/null @@ -1,8 +0,0 @@ -Import('RTT_ROOT') -from building import * - -src = Glob('*.c') - -group = DefineGroup('ui', src, depend = ['']) - -Return('group') diff --git a/bsp/simulator/ui/application.cc b/bsp/simulator/ui/application.cc deleted file mode 100644 index 3fc7eb5dc..000000000 --- a/bsp/simulator/ui/application.cc +++ /dev/null @@ -1,31 +0,0 @@ -#include - -#include "appmgr.h" -#include "statusbar.h" - -int rt_application_init() -{ - rt_device_t device; - struct rt_device_rect_info info; - - device = rt_device_find("sdl"); - if (device != RT_NULL) - { - info.width = 800; - info.height = 480; - - /* set graphic resolution */ - rt_device_control(device, RTGRAPHIC_CTRL_SET_MODE, &info); - } - /* re-set graphic device */ - rtgui_graphic_set_device(device); - /* re-init mouse */ - rtgui_mouse_init(); - - app_mgr_init(); - rt_thread_delay(10); - app_init(); - picture_app_create(); - - return 0; -} diff --git a/bsp/simulator/ui/appmgr.c b/bsp/simulator/ui/appmgr.c deleted file mode 100644 index 5c13b6277..000000000 --- a/bsp/simulator/ui/appmgr.c +++ /dev/null @@ -1,133 +0,0 @@ -#include "appmgr.h" -#include -#include -#include - -#include "apps_list.h" -#include "block_panel.h" -#include "statusbar.h" - -#include "xpm/home.xpm" -#include "xpm/home_gray.xpm" - -rt_bool_t event_handler(struct rtgui_object* object, rtgui_event_t* event) -{ - rt_bool_t result; - - RT_ASSERT(object != RT_NULL); - RT_ASSERT(event != RT_NULL); - - result = RT_TRUE; - switch (event->type) - { - case RTGUI_EVENT_APP_CREATE: - case RTGUI_EVENT_APP_DESTROY: - return apps_list_event_handler(object, event); - - default: - /* invoke parent event handler */ - result = rtgui_app_event_handler(object, event); - break; - } - - return result; -} - -void app_mgr_win_init(void) -{ - struct rtgui_win* win; - rtgui_rect_t rect; - struct rtgui_notebook *notebook; - struct rtgui_image* pressed_image; - struct rtgui_image* unpressed_image; - int font_size; - struct block_panel* block; - int angle_y; - - /* create main window of Application Manager */ - win = rtgui_mainwin_create(RT_NULL, "AppMgr", RTGUI_WIN_STYLE_MAINWIN); - RTGUI_WIDGET_BACKGROUND(win) = RTGUI_RGB(241, 241, 241); - - /* create icon image */ - pressed_image = rtgui_image_create_from_mem("xpm", (const rt_uint8_t*)home_xpm, sizeof(home_xpm), RT_FALSE); - unpressed_image = rtgui_image_create_from_mem("xpm", (const rt_uint8_t*)home_gray_xpm, sizeof(home_gray_xpm), RT_FALSE); - rtgui_font_get_metrics(RTGUI_WIDGET_FONT(win), "AppMgr", &rect); - font_size = rtgui_rect_height(rect); - - /* create notebook */ - rtgui_widget_get_extent(RTGUI_WIDGET(win), &rect); - notebook = rtgui_notebook_create(&rect, RTGUI_NOTEBOOK_LEFT); - RTGUI_WIDGET_BACKGROUND(notebook) = RTGUI_RGB(241, 241, 241); - rtgui_notebook_set_tab_height(notebook, pressed_image->h + font_size + 4 * RTGUI_WIDGET_DEFAULT_MARGIN); - rtgui_notebook_set_tab_width(notebook, 80); - angle_y = rect.x1; - - /* create navigation */ - block = block_panel_create(angle_y + notebook->tab_h/2, &rect); - RTGUI_WIDGET_BACKGROUND(block) = RTGUI_RGB(241, 241, 241); -#ifdef _WIN32 - rtgui_notebook_add_image(notebook, "Programs", RTGUI_WIDGET(block), - pressed_image, unpressed_image); -#endif -#ifndef _WIN32 - program_create(RTGUI_PANEL(block)); -#endif - angle_y += notebook->tab_h; - - rtgui_notebook_get_client_rect(notebook, &rect); - block = block_panel_create(angle_y + notebook->tab_h/2, &rect); - RTGUI_WIDGET_BACKGROUND(block) = RTGUI_RGB(241, 241, 241); -#ifdef _WIN32 - rtgui_notebook_add_image(notebook, "Task", RTGUI_WIDGET(block), - pressed_image, unpressed_image); -#endif - apps_list_create(RTGUI_PANEL(block)); - angle_y += notebook->tab_h; - - block = block_panel_create(angle_y + notebook->tab_h/2, &rect); - RTGUI_WIDGET_BACKGROUND(block) = RTGUI_RGB(241, 241, 241); -#ifdef _WIN32 - rtgui_notebook_add_image(notebook, "Setting", RTGUI_WIDGET(block), - pressed_image, unpressed_image); -#endif - angle_y += notebook->tab_h; - - rtgui_container_add_child(RTGUI_CONTAINER(win), RTGUI_WIDGET(notebook)); - - rtgui_win_show(win, RT_FALSE); - - /* set as main window */ - rtgui_app_set_main_win(win); -} - -void app_mgr_entry(void* parameter) -{ - struct rtgui_app* application; - - application = rtgui_app_create(rt_thread_self(), "AppMgr"); - if (application != RT_NULL) - { - /* set as window manager */ - rtgui_app_set_as_wm(); - - /* initialize status bar */ - statusbar_init(); - app_mgr_win_init(); - - /* set our event handler */ - rtgui_object_set_event_handler(RTGUI_OBJECT(application), - event_handler); - rtgui_app_run(application); - rtgui_app_destroy(application); - } -} - -void app_mgr_init(void) -{ - rt_thread_t tid; - - tid = rt_thread_create("app_mgr", app_mgr_entry, RT_NULL, 4096, 20, 20); - if (tid != RT_NULL) - rt_thread_startup(tid); -} - diff --git a/bsp/simulator/ui/appmgr.h b/bsp/simulator/ui/appmgr.h deleted file mode 100644 index 9e4306355..000000000 --- a/bsp/simulator/ui/appmgr.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __APPMGR_H__ -#define __APPMGR_H__ - -#include -#include -#include -#include -#include - -void app_mgr_win_init(void); - -#endif diff --git a/bsp/simulator/ui/apps_list.c b/bsp/simulator/ui/apps_list.c deleted file mode 100644 index 0e4bb0af3..000000000 --- a/bsp/simulator/ui/apps_list.c +++ /dev/null @@ -1,268 +0,0 @@ -#include "apps_list.h" -#include -#include - -#include "xpm/exec.xpm" -#include "xpm/close.xpm" - -/* application manager */ -struct rtgui_application_item -{ - struct rtgui_app* app; -}; -static struct rtgui_application_item *app_items = RT_NULL; -static rt_uint16_t app_count = 0; -static struct rtgui_listctrl* app_list; -static struct rtgui_image* app_default_icon = RT_NULL; -static struct rtgui_image* app_close = RT_NULL; - -static void _handle_app_create(struct rtgui_event_application* event) -{ - rt_uint32_t index; - rt_int32_t status; - struct rtgui_app* app; - - status = RTGUI_STATUS_OK; - for (index = 0; index < app_count; index ++) - { - app = (struct rtgui_app*)app_items[index].app; - if (app == event->app) - { - /* application is created already */ - status = RTGUI_STATUS_ERROR; - goto __exit; - } - } - - app_count += 1; - if (app_items == RT_NULL) - app_items = (struct rtgui_application_item*) rtgui_malloc(sizeof(struct rtgui_application_item)); - else - app_items = (struct rtgui_application_item*) rtgui_realloc(app_items, sizeof(struct rtgui_application_item) * app_count); - - if (app_items == RT_NULL) - { - status = RTGUI_STATUS_ERROR; - goto __exit; - } - - app = event->app; - - app_items[app_count - 1].app = app; - rtgui_listctrl_set_items(app_list, (rt_uint32_t)app_items, app_count); - -__exit: - /* send ack to the application */ - rtgui_ack(RTGUI_EVENT(event), status); - return; -} - -static void _handle_app_destroy(struct rtgui_event_application* event) -{ - rt_uint32_t index; - struct rtgui_app* app; - - for (index = 0; index < app_count; index ++) - { - app = (struct rtgui_app*)app_items[index].app; - if (app == event->app) - { - /* remove this application */ - app_count --; - if (app_count == 0) - { - rtgui_free(app_items); - app_items = RT_NULL; - } - else if (index == app_count) - { - app_items = rtgui_realloc(app_items, app_count * sizeof(struct rtgui_application_item)); - } - else - { - rt_uint32_t j; - for (j = index; j < app_count; j ++) - { - app_items[j] = app_items[j + 1]; - } - app_items = rtgui_realloc(app_items, app_count * sizeof(struct rtgui_application_item)); - } - rtgui_listctrl_set_items(app_list, (rt_uint32_t)app_items, app_count); - rtgui_ack(RTGUI_EVENT(event), RTGUI_STATUS_OK); - return ; - } - } - - /* send ack to the application */ - rtgui_ack(RTGUI_EVENT(event), RTGUI_STATUS_ERROR); - return; -} - -static rt_bool_t _handle_app_activate(struct rtgui_object* object, struct rtgui_event* event) -{ - struct rtgui_application_item *item; - - if (app_list->current_item == -1) return RT_TRUE; - item = &app_items[app_list->current_item]; - - rtgui_app_activate(item->app); - - return RT_TRUE; -} - -rt_bool_t apps_list_event_handler(struct rtgui_object* object, struct rtgui_event* event) -{ - RT_ASSERT(object != RT_NULL); - RT_ASSERT(event != RT_NULL); - - switch (event->type) - { - case RTGUI_EVENT_APP_CREATE: - _handle_app_create((struct rtgui_event_application*) event); - break; - - case RTGUI_EVENT_APP_DESTROY: - _handle_app_destroy((struct rtgui_event_application*) event); - break; - } - - return RT_TRUE; -} - -static rt_bool_t apps_listctrl_event_handler(struct rtgui_object* object, struct rtgui_event* event) -{ - struct rtgui_listctrl* ctrl; - - ctrl = RTGUI_LISTCTRL(object); - if (event->type == RTGUI_EVENT_MOUSE_BUTTON) - { - struct rtgui_rect rect, close_rect; - struct rtgui_event_mouse* emouse; - - emouse = (struct rtgui_event_mouse*)event; - if (emouse->button & RTGUI_MOUSE_BUTTON_UP) - { - /* get physical extent information */ - rtgui_widget_get_extent(RTGUI_WIDGET(ctrl), &rect); - close_rect = rect; - close_rect.x1 = close_rect.x2 - 50; - - if ((rtgui_rect_contains_point(&close_rect, emouse->x, emouse->y) == RT_EOK) && - (ctrl->items_count > 0)) - { - rt_uint16_t index; - index = (emouse->y - rect.y1) / (2 + ctrl->item_height); - - if ((index < ctrl->page_items) && - (ctrl->current_item/ctrl->page_items)* ctrl->page_items + index < ctrl->items_count) - { - rt_uint16_t cur_item; - - /* get current item */ - cur_item = (ctrl->current_item/ctrl->page_items) * ctrl->page_items + index; - if (cur_item == ctrl->current_item) - { - rt_kprintf("close app\n"); - rtgui_app_close(app_items[ctrl->current_item].app); - return RT_TRUE; - } - } - } - } - } - - return rtgui_listctrl_event_handler(object, event); -} - -static void _app_info_draw(struct rtgui_listctrl *list, struct rtgui_dc* dc, rtgui_rect_t* rect, rt_uint16_t index) -{ - struct rtgui_image *image; - rtgui_rect_t item_rect, image_rect; - struct rtgui_application_item *item, *items; - - item_rect = *rect; - item_rect.x1 += 5; - - /* draw item */ - items = (struct rtgui_application_item*)list->items; - item = &items[index]; - - /* draw image */ - if (item->app->icon != RT_NULL) image = item->app->icon; - else image = app_default_icon; - - if (image != RT_NULL) - { - image_rect.x1 = image_rect.y1 = 0; - image_rect.x2 = app_default_icon->w; - image_rect.y2 = app_default_icon->h; - - rtgui_rect_moveto_align(&item_rect, &image_rect, RTGUI_ALIGN_CENTER_VERTICAL); - rtgui_image_blit(image, dc, &image_rect); - } - item_rect.x1 += app_default_icon->w + RTGUI_WIDGET_DEFAULT_MARGIN; - - /* draw text */ - rtgui_dc_draw_text(dc, (const char*)item->app->name, &item_rect); item_rect.x1 += 60; - - if (list->current_item == index) - { - /* draw close button */ - image_rect.x1 = image_rect.y1 = 0; - image_rect.x2 = app_close->w; - image_rect.y2 = app_close->h; - - item_rect.x1 = item_rect.x2 - 50; - rtgui_rect_moveto_align(&item_rect, &image_rect, RTGUI_ALIGN_CENTER_VERTICAL); - rtgui_image_blit(app_close, dc, &image_rect); - } -} - -struct rtgui_panel* apps_list_create(struct rtgui_panel* panel) -{ - struct rtgui_rect rect; - - RT_ASSERT(panel != RT_NULL); - - if (app_default_icon == RT_NULL) - { - app_default_icon = rtgui_image_create_from_mem("xpm", (const rt_uint8_t*)exec_xpm, sizeof(exec_xpm), RT_FALSE); - } - if (app_close == RT_NULL) - { - app_close = rtgui_image_create_from_mem("xpm", (const rt_uint8_t *)close_xpm, sizeof(close_xpm), RT_FALSE); - } - - rtgui_widget_get_extent(RTGUI_WIDGET(panel), &rect); - - /* create application list */ - rtgui_rect_inflate(&rect, -15); - - app_list = rtgui_listctrl_create((rt_uint32_t)app_items, app_count, &rect, _app_info_draw); - rtgui_listctrl_set_itemheight(app_list, app_default_icon->h + 2); - rtgui_listctrl_set_onitem(app_list, _handle_app_activate); - rtgui_object_set_event_handler(RTGUI_OBJECT(app_list), apps_listctrl_event_handler); - - rtgui_container_add_child(RTGUI_CONTAINER(panel), RTGUI_WIDGET(app_list)); - - return RTGUI_PANEL(panel); -} - -#ifdef RT_USING_FINSH -#include -void list_apps(void) -{ - rt_uint32_t index; - struct rtgui_app* app; - - rt_kprintf("GUI Applications:\n"); - rt_kprintf("=================\n"); - - for (index = 0; index < app_count; index ++) - { - app = (struct rtgui_app*) app_items[index].app; - rt_kprintf("%s\n", app->name); - } -} -FINSH_FUNCTION_EXPORT(list_apps,show the application list); -#endif diff --git a/bsp/simulator/ui/apps_list.h b/bsp/simulator/ui/apps_list.h deleted file mode 100644 index 9fc71a142..000000000 --- a/bsp/simulator/ui/apps_list.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef __APPS_LIST_H__ -#define __APPS_LIST_H__ - -#include -#include -#include - -rt_bool_t apps_list_event_handler(struct rtgui_object* object, struct rtgui_event* event); -struct rtgui_panel* apps_list_create(struct rtgui_panel* panel); - -#endif diff --git a/bsp/simulator/ui/block_panel.c b/bsp/simulator/ui/block_panel.c deleted file mode 100644 index be543f0a6..000000000 --- a/bsp/simulator/ui/block_panel.c +++ /dev/null @@ -1,118 +0,0 @@ -#include -#include "block_panel.h" - -static void dc_render_block(struct rtgui_dc* dc, struct rtgui_rect *rect, int angle_y) -{ -#define BLOCK_BORDER_SZ 5 -#define BLOCK_ANGLE_SZ 10 - int rect_y[12]; - int rect_x[12]; - int ri = 0; - rtgui_color_t line_color = RTGUI_RGB(215, 215, 215); - // rtgui_color_t external_color = RTGUI_RGB(241, 241, 241); - // rtgui_color_t angle_color = RTGUI_RGB(229, 229, 229); - rtgui_color_t fg, bg; - struct rtgui_gc *gc; - - rect_x[ri] = rect->x1 + BLOCK_ANGLE_SZ + 3; rect_y[ri] = rect->y1 + BLOCK_BORDER_SZ; ri ++; - rect_x[ri] = rect->x2 - BLOCK_BORDER_SZ - 3; rect_y[ri] = rect->y1 + BLOCK_BORDER_SZ; ri ++; - rect_x[ri] = rect->x2 - BLOCK_BORDER_SZ; rect_y[ri] = rect->y1 + BLOCK_BORDER_SZ + 3; ri ++; - rect_x[ri] = rect->x2 - BLOCK_BORDER_SZ; rect_y[ri] = rect->y2 - BLOCK_BORDER_SZ - 3; ri ++; - rect_x[ri] = rect->x2 - BLOCK_BORDER_SZ - 3; rect_y[ri] = rect->y2 - BLOCK_BORDER_SZ; ri ++; - rect_x[ri] = rect->x1 + BLOCK_ANGLE_SZ + 3; rect_y[ri] = rect->y2 - BLOCK_BORDER_SZ; ri ++; - rect_x[ri] = rect->x1 + BLOCK_ANGLE_SZ ; rect_y[ri] = rect->y2 - BLOCK_BORDER_SZ - 3; ri ++; - - /* angle */ - rect_x[ri] = rect->x1 + BLOCK_ANGLE_SZ ; rect_y[ri] = angle_y + BLOCK_ANGLE_SZ; ri ++; - rect_x[ri] = rect->x1; rect_y[ri] = angle_y; ri ++; - rect_x[ri] = rect->x1 + BLOCK_ANGLE_SZ ; rect_y[ri] = angle_y - BLOCK_ANGLE_SZ; ri ++; - - rect_x[ri] = rect->x1 + BLOCK_ANGLE_SZ ; rect_y[ri] = rect->y1 + BLOCK_BORDER_SZ + 3; ri ++; - rect_x[ri] = rect->x1 + BLOCK_ANGLE_SZ + 3; rect_y[ri] = rect->y1 + BLOCK_BORDER_SZ; ri ++; - - gc = rtgui_dc_get_gc(dc); - fg = gc->foreground; - bg = gc->background; - gc->foreground = white; - rtgui_dc_fill_polygon(dc, rect_x, rect_y, 12); - gc->foreground = line_color; - rtgui_dc_draw_polygon(dc, rect_x, rect_y, 12); - gc->foreground = fg; - gc->background = bg; -} - -static void _block_panel_constructor(block_panel_t *panel) -{ - /* init widget and set event handler */ - rtgui_object_set_event_handler(RTGUI_OBJECT(panel), block_panel_event_handler); - - /* set field */ - panel->angle_y = 10; -} - -DEFINE_CLASS_TYPE(block_panel, "block_panel", - RTGUI_PANEL_TYPE, - _block_panel_constructor, - RT_NULL, - sizeof(struct block_panel)); - -struct block_panel *block_panel_create(int angle_y, struct rtgui_rect *rect) -{ - struct block_panel* panel; - - panel = (struct block_panel*) rtgui_widget_create(BLOCK_PANEL_TYPE); - if (panel != RT_NULL) - { - panel->angle_y = angle_y; - - rtgui_widget_set_rect(RTGUI_WIDGET(panel), rect); - rtgui_object_set_event_handler(RTGUI_OBJECT(panel), block_panel_event_handler); - } - - return panel; -} - -void block_panel_destroy(block_panel_t* panel) -{ - rtgui_object_destroy(RTGUI_OBJECT(panel)); -} - -rt_bool_t block_panel_event_handler(struct rtgui_object* object, struct rtgui_event* event) -{ - struct block_panel *panel; - - panel = BLOCK_PANEL(object); - if (event->type == RTGUI_EVENT_PAINT) - { - struct rtgui_dc* dc; - struct rtgui_rect rect; - - rtgui_widget_get_rect(RTGUI_WIDGET(object), &rect); - dc = rtgui_dc_begin_drawing(RTGUI_WIDGET(object)); - - rtgui_dc_fill_rect(dc, &rect); - rtgui_rect_inflate(&rect, - 3); - dc_render_block(dc, &rect, panel->angle_y); - - /* paint on each child */ - rtgui_container_dispatch_event(RTGUI_CONTAINER(panel), event); - rtgui_dc_end_drawing(dc); - } - else - { - return rtgui_panel_event_handler(object, event); - } - - return RT_FALSE; -} - -void block_panel_get_client_extent(struct block_panel *panel, struct rtgui_rect *rect) -{ - RT_ASSERT(panel != RT_NULL); - RT_ASSERT(rect != RT_NULL); - - rtgui_widget_get_extent(RTGUI_WIDGET(panel), rect); - rect->x1 += 20; rect->y1 += 10; - rect->x2 -= 10; rect->y2 -= 10; -} - diff --git a/bsp/simulator/ui/block_panel.h b/bsp/simulator/ui/block_panel.h deleted file mode 100644 index d396f7976..000000000 --- a/bsp/simulator/ui/block_panel.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __BLOCK_PANEL_H__ -#define __BLOCK_PANEL_H__ -#include - -DECLARE_CLASS_TYPE(block_panel); - -/** Gets the type of a block panel */ -#define BLOCK_PANEL_TYPE (RTGUI_TYPE(block_panel)) -/** Casts the object to an block panel */ -#define BLOCK_PANEL(obj) (RTGUI_OBJECT_CAST((obj), BLOCK_PANEL_TYPE, block_panel_t)) -/** Checks if the object is an block panel */ -#define RTGUI_IS_BLOCK_PANEL(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), BLOCK_PANEL_TYPE)) - -/* - * the block panel widget - */ -struct block_panel -{ - struct rtgui_panel parent; - - int angle_y; -}; -typedef struct block_panel block_panel_t; - -struct block_panel *block_panel_create(int angle_y, struct rtgui_rect *rect); -void block_panel_destroy(block_panel_t* panel); - -rt_bool_t block_panel_event_handler(struct rtgui_object *object, struct rtgui_event* event); -void block_panel_get_client_extent(struct block_panel *panel, struct rtgui_rect *rect); - -#endif - diff --git a/bsp/simulator/ui/calibration.cc b/bsp/simulator/ui/calibration.cc deleted file mode 100644 index 321b7eb39..000000000 --- a/bsp/simulator/ui/calibration.cc +++ /dev/null @@ -1,322 +0,0 @@ -#include -#include -#include -#include -#include - -#include "touch.h" -#include "setup.h" - -#define CALIBRATION_STEP_LEFTTOP 0 -#define CALIBRATION_STEP_RIGHTTOP 1 -#define CALIBRATION_STEP_RIGHTBOTTOM 2 -#define CALIBRATION_STEP_LEFTBOTTOM 3 -#define CALIBRATION_STEP_CENTER 4 - -#define TOUCH_WIN_UPDATE 1 -#define TOUCH_WIN_CLOSE 2 - -#define CALIBRATION_WIDTH 15 -#define CALIBRATION_HEIGHT 15 - -struct calibration_session -{ - rt_uint8_t step; - - struct calibration_data data; - - rt_uint16_t width; rt_uint16_t height; - - rtgui_win_t* win; - - rt_device_t device; - rt_thread_t tid; -}; -static struct calibration_session* calibration_ptr = RT_NULL; - -static void calibration_data_post(rt_uint16_t x, rt_uint16_t y) -{ - rt_kprintf("calibration_data_post x %d y %d\n", x, y); - - if (calibration_ptr != RT_NULL) - { - switch (calibration_ptr->step) - { - case CALIBRATION_STEP_LEFTTOP: - calibration_ptr->data.min_x = x; - calibration_ptr->data.min_y = y; - break; - - case CALIBRATION_STEP_RIGHTTOP: - calibration_ptr->data.max_x = x; - calibration_ptr->data.min_y = (calibration_ptr->data.min_y + y)/2; - break; - - case CALIBRATION_STEP_LEFTBOTTOM: - calibration_ptr->data.min_x = (calibration_ptr->data.min_x + x)/2; - calibration_ptr->data.max_y = y; - break; - - case CALIBRATION_STEP_RIGHTBOTTOM: - calibration_ptr->data.max_x = (calibration_ptr->data.max_x + x)/2; - calibration_ptr->data.max_y = (calibration_ptr->data.max_y + y)/2; - break; - - case CALIBRATION_STEP_CENTER: - /* calibration done */ - { - rt_uint16_t w, h; - - struct rtgui_event_command ecmd; - RTGUI_EVENT_COMMAND_INIT(&ecmd); - ecmd.wid = calibration_ptr->win; - ecmd.command_id = TOUCH_WIN_CLOSE; - - /* calculate calibrated data */ - if (calibration_ptr->data.max_x > calibration_ptr->data.min_x) - w = calibration_ptr->data.max_x - calibration_ptr->data.min_x; - else - w = calibration_ptr->data.min_x - calibration_ptr->data.max_x; - w = (w/(calibration_ptr->width - 2 * CALIBRATION_WIDTH)) * CALIBRATION_WIDTH; - - if (calibration_ptr->data.max_y > calibration_ptr->data.min_y) - h = calibration_ptr->data.max_y - calibration_ptr->data.min_y; - else - h = calibration_ptr->data.min_y - calibration_ptr->data.max_y; - h = (h/(calibration_ptr->height - 2 * CALIBRATION_HEIGHT)) * CALIBRATION_HEIGHT; - - rt_kprintf("w: %d, h: %d\n", w, h); - - if (calibration_ptr->data.max_x > calibration_ptr->data.min_x) - { - calibration_ptr->data.min_x -= w; - calibration_ptr->data.max_x += w; - } - else - { - calibration_ptr->data.min_x += w; - calibration_ptr->data.max_x -= w; - } - - if (calibration_ptr->data.max_y > calibration_ptr->data.min_y) - { - calibration_ptr->data.min_y -= h; - calibration_ptr->data.max_y += h; - } - else - { - calibration_ptr->data.min_y += h; - calibration_ptr->data.max_y -= h; - } - - rt_kprintf("calibration data: (%d, %d), (%d, %d)\n", - calibration_ptr->data.min_x, - calibration_ptr->data.max_x, - calibration_ptr->data.min_y, - calibration_ptr->data.max_y); - rtgui_send(calibration_ptr->tid, &ecmd.parent, sizeof(struct rtgui_event_command)); - } - return; - } - - calibration_ptr->step ++; - - /* post command event */ - { - struct rtgui_event_command ecmd; - RTGUI_EVENT_COMMAND_INIT(&ecmd); - ecmd.wid = calibration_ptr->win; - ecmd.command_id = TOUCH_WIN_UPDATE; - - rtgui_send(calibration_ptr->tid, &ecmd.parent, sizeof(struct rtgui_event_command)); - } - } -} - -rt_bool_t calibration_event_handler(struct rtgui_object* object, struct rtgui_event* event) -{ - struct rtgui_widget *widget = RTGUI_WIDGET(object); - - switch (event->type) - { - case RTGUI_EVENT_PAINT: - { - struct rtgui_dc* dc; - struct rtgui_rect rect; - - dc = rtgui_dc_begin_drawing(widget); - if (dc == RT_NULL) break; - - /* get rect information */ - rtgui_widget_get_rect(widget, &rect); - - /* clear whole window */ - RTGUI_WIDGET_BACKGROUND(widget) = white; - rtgui_dc_fill_rect(dc, &rect); - - /* reset color */ - RTGUI_WIDGET_BACKGROUND(widget) = green; - RTGUI_WIDGET_FOREGROUND(widget) = black; - - switch (calibration_ptr->step) - { - case CALIBRATION_STEP_LEFTTOP: - rtgui_dc_draw_hline(dc, 0, 2 * CALIBRATION_WIDTH, CALIBRATION_HEIGHT); - rtgui_dc_draw_vline(dc, CALIBRATION_WIDTH, 0, 2 * CALIBRATION_HEIGHT); - RTGUI_WIDGET_FOREGROUND(widget) = red; - rtgui_dc_fill_circle(dc, CALIBRATION_WIDTH, CALIBRATION_HEIGHT, 4); - break; - - case CALIBRATION_STEP_RIGHTTOP: - rtgui_dc_draw_hline(dc, calibration_ptr->width - 2 * CALIBRATION_WIDTH, - calibration_ptr->width, CALIBRATION_HEIGHT); - rtgui_dc_draw_vline(dc, calibration_ptr->width - CALIBRATION_WIDTH, 0, 2 * CALIBRATION_HEIGHT); - RTGUI_WIDGET_FOREGROUND(widget) = red; - rtgui_dc_fill_circle(dc, calibration_ptr->width - CALIBRATION_WIDTH, CALIBRATION_HEIGHT, 4); - break; - - case CALIBRATION_STEP_LEFTBOTTOM: - rtgui_dc_draw_hline(dc, 0, 2 * CALIBRATION_WIDTH, calibration_ptr->height - CALIBRATION_HEIGHT); - rtgui_dc_draw_vline(dc, CALIBRATION_WIDTH, calibration_ptr->height - 2 * CALIBRATION_HEIGHT, calibration_ptr->height); - RTGUI_WIDGET_FOREGROUND(widget) = red; - rtgui_dc_fill_circle(dc, CALIBRATION_WIDTH, calibration_ptr->height - CALIBRATION_HEIGHT, 4); - break; - - case CALIBRATION_STEP_RIGHTBOTTOM: - rtgui_dc_draw_hline(dc, calibration_ptr->width - 2 * CALIBRATION_WIDTH, - calibration_ptr->width, calibration_ptr->height - CALIBRATION_HEIGHT); - rtgui_dc_draw_vline(dc, calibration_ptr->width - CALIBRATION_WIDTH, calibration_ptr->height - 2 * CALIBRATION_HEIGHT, calibration_ptr->height); - RTGUI_WIDGET_FOREGROUND(widget) = red; - rtgui_dc_fill_circle(dc, calibration_ptr->width - CALIBRATION_WIDTH, calibration_ptr->height - CALIBRATION_HEIGHT, 4); - break; - - case CALIBRATION_STEP_CENTER: - rtgui_dc_draw_hline(dc, calibration_ptr->width/2 - CALIBRATION_WIDTH, calibration_ptr->width/2 + CALIBRATION_WIDTH, calibration_ptr->height/2); - rtgui_dc_draw_vline(dc, calibration_ptr->width/2, calibration_ptr->height/2 - CALIBRATION_HEIGHT, calibration_ptr->height/2 + CALIBRATION_HEIGHT); - RTGUI_WIDGET_FOREGROUND(widget) = red; - rtgui_dc_fill_circle(dc, calibration_ptr->width/2, calibration_ptr->height/2, 4); - break; - } - rtgui_dc_end_drawing(dc); - } - break; - - case RTGUI_EVENT_COMMAND: - { - struct rtgui_event_command* ecmd = (struct rtgui_event_command*)event; - - switch (ecmd->command_id) - { - case TOUCH_WIN_UPDATE: - rtgui_widget_update(widget); - break; - case TOUCH_WIN_CLOSE: - rtgui_win_close(RTGUI_WIN(widget)); - break; - } - } - return RT_TRUE; - - default: - rtgui_win_event_handler(RTGUI_OBJECT(widget), event); - } - - return RT_FALSE; -} - -void calibration_entry(void* parameter) -{ - rt_device_t device; - struct rtgui_rect rect; - struct rtgui_app* application; - struct setup_items setup; - - device = rt_device_find("touch"); - if (device == RT_NULL) return; /* no this device */ - - calibration_ptr = (struct calibration_session*) - rt_malloc(sizeof(struct calibration_session)); - rt_memset(calibration_ptr, 0, sizeof(struct calibration_data)); - calibration_ptr->device = device; - calibration_ptr->tid = rt_thread_self(); - - rt_device_control(calibration_ptr->device, RT_TOUCH_CALIBRATION, - (void*)calibration_data_post); - - rtgui_graphic_driver_get_rect(rtgui_graphic_driver_get_default(), &rect); - - /* set screen rect */ - calibration_ptr->width = rect.x2; - calibration_ptr->height = rect.y2; - - application = rtgui_app_create(rt_thread_self(), "calibration"); - if (application != RT_NULL) - { - /* create calibration window */ - calibration_ptr->win = rtgui_win_create(RT_NULL, - "calibration", &rect, - RTGUI_WIN_STYLE_NO_TITLE | RTGUI_WIN_STYLE_NO_BORDER | - RTGUI_WIN_STYLE_ONTOP | RTGUI_WIN_STYLE_DESTROY_ON_CLOSE); - if (calibration_ptr->win != RT_NULL) - { - rtgui_object_set_event_handler(RTGUI_OBJECT(calibration_ptr->win), - calibration_event_handler); - rtgui_win_show(calibration_ptr->win, RT_TRUE); - } - - rtgui_app_destroy(application); - } - - /* set calibration data */ - rt_device_control(calibration_ptr->device, RT_TOUCH_CALIBRATION_DATA, - &calibration_ptr->data); - - //save setup - setup.touch_min_x = calibration_ptr->data.min_x; - setup.touch_max_x = calibration_ptr->data.max_x; - setup.touch_min_y = calibration_ptr->data.min_y; - setup.touch_max_y = calibration_ptr->data.max_y; - setup_save(&setup); - - /* recover to normal */ - rt_device_control(calibration_ptr->device, RT_TOUCH_NORMAL, RT_NULL); - - /* release memory */ - rt_free(calibration_ptr); - calibration_ptr = RT_NULL; -} - -void calibration_init(void) -{ - rt_thread_t tid; - struct setup_items setup; - - if(setup_load(&setup) == RT_EOK) - { - struct calibration_data data; - rt_device_t device; - - data.min_x = setup.touch_min_x; - data.max_x = setup.touch_max_x; - data.min_y = setup.touch_min_y; - data.max_y = setup.touch_max_y; - - device = rt_device_find("touch"); - if(device != RT_NULL) - rt_device_control(device, RT_TOUCH_CALIBRATION_DATA, &data); - return; - } - - tid = rt_thread_create("cali", calibration_entry, RT_NULL, 1024, 20, 20); - if (tid != RT_NULL) - rt_thread_startup(tid); -} - -#ifdef RT_USING_FINSH -#include -void calibration(void) -{ - calibration_init(); -} -FINSH_FUNCTION_EXPORT(calibration, perform touch calibration); -#endif diff --git a/bsp/simulator/ui/ex_app.c b/bsp/simulator/ui/ex_app.c deleted file mode 100644 index 9f4c6aab1..000000000 --- a/bsp/simulator/ui/ex_app.c +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include -#include -#include - -void app1_entry(void* parameter) -{ - struct rtgui_app* application; - struct rtgui_win* win; - - application = rtgui_app_create(rt_thread_self(), "ExApp1"); - if (application != RT_NULL) - { - struct rtgui_label *label; - struct rtgui_box *box; - - box = rtgui_box_create(RTGUI_VERTICAL, 10); - label = rtgui_label_create("Hello World"); - win = rtgui_mainwin_create(RT_NULL, "MainWin", RTGUI_WIN_STYLE_MAINWIN); - rtgui_container_set_box(RTGUI_CONTAINER(win), box); - rtgui_container_add_child(RTGUI_CONTAINER(win), RTGUI_WIDGET(label)); - rtgui_container_layout(RTGUI_CONTAINER(win)); - - rtgui_win_show(win, RT_TRUE); - - rtgui_app_destroy(application); - } -} - -void app2_entry(void* parameter) -{ - struct rtgui_app* application; - struct rtgui_win* win; - - application = rtgui_app_create(rt_thread_self(), "ExApp2"); - if (application != RT_NULL) - { - rtgui_rect_t rect = {220, 250, 400, 450}; - win = rtgui_win_create(RT_NULL, "Window #2", &rect, RTGUI_WIN_STYLE_DEFAULT); - rtgui_win_show(win, RT_TRUE); - - rtgui_app_destroy(application); - } -} - -void app_init(void) -{ - rt_thread_t tid; - - tid = rt_thread_create("app1", app1_entry, RT_NULL, 2048, 20, 20); - if (tid != RT_NULL) - rt_thread_startup(tid); - - tid = rt_thread_create("app2", app2_entry, RT_NULL, 2048, 20, 20); - if (tid != RT_NULL) - rt_thread_startup(tid); -} diff --git a/bsp/simulator/ui/picture.c b/bsp/simulator/ui/picture.c deleted file mode 100644 index 83a01a993..000000000 --- a/bsp/simulator/ui/picture.c +++ /dev/null @@ -1,248 +0,0 @@ -#include -#include -#include -#include -#include - -#include -#include - -#define PICTURE_DIR "/picture" - -/* current picture file name */ -rt_bool_t key_pressed = RT_FALSE; -static char current_fn[32] = {0}; -static struct rtgui_win *win; - -static void picture_show_prev(struct rtgui_widget* widget) -{ - DIR* dir; - struct dirent* entry; - rt_bool_t is_last; - char fn[32]; - struct rtgui_image_engine* engine; - - fn[0] = '\0'; - is_last = RT_FALSE; - - dir = opendir(PICTURE_DIR); - if (dir == RT_NULL) - { - rt_kprintf("open directory failed\n"); - return; - } - - do - { - entry = readdir(dir); - if (entry != RT_NULL) - { - engine = rtgui_image_get_engine_by_filename(entry->d_name); - if (engine != RT_NULL) - { - /* it's a HDC image */ - if ((strcmp(entry->d_name, current_fn) == 0) && - is_last != RT_TRUE) - { - if (fn[0] == '\0') - { - /* it should be the last image */ - is_last = RT_TRUE; - } - else - { - /* display image */ - strcpy(current_fn, fn); - rtgui_widget_update(widget); - closedir(dir); - return; - } - } - strcpy(fn, entry->d_name); - } - } - } while(entry != RT_NULL); - - /* close directory */ - closedir(dir); - - if ((is_last == RT_TRUE) && fn[0] != '\0') - { - strcpy(current_fn, fn); - rtgui_widget_update(widget); - } -} - -static void picture_show_next(struct rtgui_widget* widget) -{ - DIR* dir; - struct dirent* entry; - rt_bool_t found, has_image; - struct rtgui_image_engine* engine; - - found = RT_FALSE; has_image = RT_FALSE; - -__restart: - dir = opendir(PICTURE_DIR); - if (dir == RT_NULL) - { - rt_kprintf("open directory failed\n"); - return; - } - - do - { - entry = readdir(dir); - if (entry != RT_NULL) - { - engine = rtgui_image_get_engine_by_filename(entry->d_name); - if (engine != RT_NULL) - { - /* this directory includes image */ - has_image = RT_TRUE; - - if (found == RT_TRUE || current_fn[0] == '\0') - { - strcpy(current_fn, entry->d_name); - rtgui_widget_update(widget); - - closedir(dir); - return; - } - - /* it's a HDC image */ - if (strcmp(entry->d_name, current_fn) == 0) - found = RT_TRUE; - } - } - } while(entry != RT_NULL); - - /* close directory */ - closedir(dir); - - if (has_image != RT_TRUE) return; - current_fn[0] = '\0'; - goto __restart; -} - -static rt_bool_t onkey_handle(struct rtgui_object* object, struct rtgui_event* event) -{ - struct rtgui_event_kbd* ekbd = (struct rtgui_event_kbd*)event; - - if (ekbd->type == RTGUI_KEYDOWN) - { - if (ekbd->key == RTGUIK_RIGHT) - { - key_pressed = RT_TRUE; - picture_show_next(RTGUI_WIDGET(object)); - return RT_TRUE; - } - else if (ekbd->key == RTGUIK_LEFT) - { - key_pressed = RT_TRUE; - picture_show_prev(RTGUI_WIDGET(object)); - return RT_TRUE; - } - } - return RT_TRUE; -} - -static rt_bool_t picture_view_event_handler(rtgui_object_t *object, rtgui_event_t *event) -{ - if (event->type == RTGUI_EVENT_PAINT) - { - struct rtgui_dc* dc; - struct rtgui_rect rect; - struct rtgui_image* image = RT_NULL; - char fn[32]; - - dc = rtgui_dc_begin_drawing(RTGUI_WIDGET(object)); - if (dc == RT_NULL) return RT_FALSE; - rtgui_widget_get_rect(RTGUI_WIDGET(object), &rect); - - /* open image */ - rt_snprintf(fn, sizeof(fn), "%s/%s", PICTURE_DIR, current_fn); - rt_kprintf("pic fn: %s\n", fn); - image = rtgui_image_create(fn, RT_FALSE); - - if (image != RT_NULL) - { - /* blit image */ - rtgui_image_blit(image, dc, &rect); - /* destroy image */ - rtgui_image_destroy(image); - } - else - { - rtgui_dc_fill_rect(dc, &rect); - rtgui_dc_draw_text(dc, "没有文件被打开", &rect); - } - rtgui_dc_end_drawing(dc); - - return RT_FALSE; - } - - return rtgui_win_event_handler(object, event); -} - -static void timeout(struct rtgui_timer* timer, void* parameter) -{ - struct rtgui_widget* widget; - - widget = (struct rtgui_widget*)parameter; - - if (key_pressed == RT_TRUE) - key_pressed = RT_FALSE; - else - picture_show_next(widget); -} - -void picture_show(void* parameter) -{ - /* create application */ - struct rtgui_app *app; - struct rtgui_rect rect1; - rtgui_timer_t *timer; - - app = rtgui_app_create(rt_thread_self(), "picture"); - if (app == RT_NULL) - { - rt_kprintf("Create application \"picture\" failed!\n"); - return; - } - - rtgui_graphic_driver_get_rect(rtgui_graphic_driver_get_default(), &rect1); - - /* create main window */ - win = rtgui_mainwin_create(RT_NULL, "main", - RTGUI_WIN_STYLE_NO_BORDER | RTGUI_WIN_STYLE_NO_TITLE); - if (win == RT_NULL) - { - rt_kprintf("Create window \"main\" failed!\n"); - rtgui_app_destroy(app); - return; - } - - timer = rtgui_timer_create(500, RT_TIMER_FLAG_PERIODIC, timeout, (void*)win); - rtgui_timer_start(timer); - - rtgui_object_set_event_handler(RTGUI_OBJECT(win), picture_view_event_handler); - rtgui_win_set_onkey(win, onkey_handle); - rtgui_win_show(win, RT_FALSE); - - /* show next picture */ - picture_show_next(RTGUI_WIDGET(win)); - - rtgui_app_run(app); - rtgui_app_destroy(app); -} - -void picture_app_create(void) -{ - rt_thread_t tid; - - tid = rt_thread_create("pic", picture_show, RT_NULL, - 2048, 20, 8); - if (tid != RT_NULL) rt_thread_startup(tid); -} - diff --git a/bsp/simulator/ui/program.cc b/bsp/simulator/ui/program.cc deleted file mode 100644 index 01cd91ded..000000000 --- a/bsp/simulator/ui/program.cc +++ /dev/null @@ -1,187 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef _WIN32_NATIVE -#include -#include -#include -#define PATH_SEPARATOR '\\' -#else -#include -#define PATH_SEPARATOR '/' -#endif - -#define APP_PATH "/programs" -#define ITEM_MAX 10 - -static struct rtgui_list_item *items = RT_NULL; -static rtgui_list_view_t* _view = RT_NULL; -static int pos = -1; - -typedef enum -{ - IDLE, - READ_NAME, - READ_ICON, - READ_AUTHOR, - READ_LICENSE, -}XML_STATUS; - -static int xml_event_handler(rt_uint8_t event, const char* text, rt_size_t len, void* user) -{ - static XML_STATUS status = IDLE; - char fn[64]; - - if(event == EVENT_START) - { - if(strcmp(text, "name") == 0) - status = READ_NAME; - else if(strcmp(text, "image") == 0) - status = READ_ICON; - else if(strcmp(text, "author") == 0) - status = READ_AUTHOR; - else if(strcmp(text, "license") == 0) - status = READ_LICENSE; - } - else if(event == EVENT_TEXT) - { - switch(status) - { - case READ_NAME: - items[++pos].name = rt_strdup(text); - items[pos].parameter = items[pos].name; - break; - case READ_ICON: - rt_snprintf(fn, sizeof(fn), "%s/%s", APP_PATH, text); - items[pos].image = rtgui_image_create(fn, RT_TRUE); - if(items[pos].image == RT_NULL) rt_kprintf("image create failed\n"); - break; - case READ_AUTHOR: - break; - case READ_LICENSE: - break; - } - status = IDLE; - } - - return 1; -} - -static int xml_load_items(const char* filename) -{ - struct rtgui_filerw* filerw; - char buffer[512]; - rtgui_xml_t *xml; - int length; - - /* create filerw context */ - filerw = rtgui_filerw_create_file(filename, "rb"); - if (filerw == RT_NULL) - { - rt_kprintf("read file fail %s\n", filename); - return 0; - } - - length = rtgui_filerw_read(filerw, buffer, 512, 1); - if(length <= 0) - { - rt_kprintf("read fail\n"); - rtgui_filerw_close(filerw); - return 0; - } - - xml = rtgui_xml_create(512, xml_event_handler, RT_NULL); - if (xml != RT_NULL) - { - rtgui_xml_parse(xml, buffer, length); - rtgui_xml_destroy(xml); - } - - rtgui_filerw_close(filerw); - return 0; -} - -static void exec_app(rtgui_widget_t* widget, void* parameter) -{ - char path[64]; - rt_module_t module; - - RT_ASSERT(parameter != RT_NULL); - - rt_snprintf(path, sizeof(path), "%s/%s/%s.mo", APP_PATH, - (char*)parameter, (char*)parameter); - -#ifndef _WIN32 - module = rt_module_find((const char*)parameter); - if(module == RT_NULL) - rt_module_open(path); - else - { - struct rtgui_app* app; - RT_ASSERT(module->module_thread); - app = (struct rtgui_app*)(module->module_thread->user_data); - - if(app != RT_NULL) rtgui_app_activate(app); - else rt_kprintf("application is null\n"); - } -#endif -} - -static void scan_app_dir(const char* path) -{ - DIR* dir; - struct dirent* entry; - char fn[32]; - - dir = opendir(path); - if (dir == RT_NULL) - { - rt_kprintf("open directory %s failed\n", path); - return; - } - - do - { - entry = readdir(dir); - if (entry != RT_NULL) - { - if(entry->d_type == DFS_DT_REG) break; - rt_sprintf(fn, "%s/%s/%s.xml", path, entry->d_name, entry->d_name); - xml_load_items(fn); - } - } while(entry != RT_NULL); - - /* close directory */ - closedir(dir); -} - -struct rtgui_panel* program_create(struct rtgui_panel* panel) -{ - int i = 0; - struct rtgui_rect rect; - - RT_ASSERT(panel != RT_NULL); - rtgui_widget_get_extent(RTGUI_WIDGET(panel), &rect); - - items = (struct rtgui_list_item *) rtgui_malloc((ITEM_MAX) * sizeof(struct rtgui_list_item)); - for(i=0; i< ITEM_MAX; i++) items[i].action = exec_app; - - /* create application list */ - rtgui_rect_inflate(&rect, -15); - - scan_app_dir(APP_PATH); - if(pos >= 0) - { - _view = rtgui_list_view_create(items, pos + 1, &rect, RTGUI_LIST_VIEW_ICON); - rtgui_container_add_child(RTGUI_CONTAINER(panel), RTGUI_WIDGET(_view)); - } - - return RTGUI_PANEL(panel); -} - diff --git a/bsp/simulator/ui/realtouch_ui.c b/bsp/simulator/ui/realtouch_ui.c deleted file mode 100644 index f79d34a3f..000000000 --- a/bsp/simulator/ui/realtouch_ui.c +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include -#include -#include -#include "appmgr.h" -#include "statusbar.h" - -void realtouch_ui_init(void) -{ - rt_device_t device; - struct rt_device_rect_info info; -#ifndef _WIN32 - device = rt_device_find("lcd"); - { - info.width = 800; - info.height = 480; - /* set graphic resolution */ - rt_device_control(device, RTGRAPHIC_CTRL_SET_MODE, &info); - } - if (device != RT_NULL) - - /* re-set graphic device */ - rtgui_graphic_set_device(device); -#endif - - app_mgr_init(); - rt_thread_delay(10); - -#ifndef _WIN32 - calibration_init(); -#endif -} - diff --git a/bsp/simulator/ui/statusbar.c b/bsp/simulator/ui/statusbar.c deleted file mode 100644 index a05017e70..000000000 --- a/bsp/simulator/ui/statusbar.c +++ /dev/null @@ -1,166 +0,0 @@ -#include "statusbar.h" -#include -#include -#include "xpm/start.xpm" - -static const rtgui_color_t _status_bar_pixels[] = -{ - RTGUI_RGB(228,228,228), - RTGUI_RGB(182,186,192), - RTGUI_RGB(92,158,200), - RTGUI_RGB(30,117,176), - RTGUI_RGB(30,116,175), - RTGUI_RGB(29,115,174), - RTGUI_RGB(29,114,173), - RTGUI_RGB(29,114,172), - RTGUI_RGB(29,113,171), - RTGUI_RGB(28,112,170), - RTGUI_RGB(28,111,170), - RTGUI_RGB(28,111,169), - RTGUI_RGB(28,110,168), - RTGUI_RGB(27,109,167), - RTGUI_RGB(27,108,166), - RTGUI_RGB(27,108,165), - RTGUI_RGB(26,107,164), - RTGUI_RGB(26,106,163), - RTGUI_RGB(26,105,163), - RTGUI_RGB(26,105,162), - RTGUI_RGB(25,104,161), - RTGUI_RGB(25,103,160), - RTGUI_RGB(25,102,159), - RTGUI_RGB(25,101,158), - RTGUI_RGB(24,101,157), - RTGUI_RGB(24,100,156), - RTGUI_RGB(24,99,156), - RTGUI_RGB(24,98,155), - RTGUI_RGB(23,98,154), - RTGUI_RGB(23,97,153), - RTGUI_RGB(23,96,153), - RTGUI_RGB(23,95,152), - RTGUI_RGB(22,94,150), - RTGUI_RGB(22,94,149), - RTGUI_RGB(22,93,148), - RTGUI_RGB(21,92,147), - RTGUI_RGB(21,91,146), - RTGUI_RGB(21,91,145), - RTGUI_RGB(20,90,143), - RTGUI_RGB(20,89,142), - RTGUI_RGB(20,88,141), - RTGUI_RGB(19,87,139), - RTGUI_RGB(19,86,138), - RTGUI_RGB(19,85,136), - RTGUI_RGB(18,85,138), - RTGUI_RGB(18,84,137), - RTGUI_RGB(18,83,137), - RTGUI_RGB(18,82,136), - RTGUI_RGB(47,91,135), - RTGUI_RGB(255,255,255), -}; - -void dc_draw_bar(struct rtgui_dc* dc, const rtgui_color_t *bar_pixel, struct rtgui_rect *rect, int style) -{ - rt_uint32_t index; - struct rtgui_gc *gc; - rtgui_color_t fg; - - gc = rtgui_dc_get_gc(dc); - fg = gc->foreground; - - if (style == RTGUI_HORIZONTAL) - { - /* horizontal */ - for (index = rect->y1; index < rect->y2; index ++) - { - gc->foreground = bar_pixel[index - rect->y1]; - rtgui_dc_draw_hline(dc, rect->x1, rect->x2, index); - } - } - else - { - /* vertical */ - for (index = rect->x1; index < rect->x2; index ++) - { - gc->foreground = bar_pixel[index - rect->x1]; - rtgui_dc_draw_vline(dc, index, rect->y1, rect->y2); - } - } - gc->foreground = fg; -} - -rt_bool_t statusbar_event_handler(struct rtgui_object* object, struct rtgui_event* event) -{ - switch (event->type) - { - case RTGUI_EVENT_PAINT: - { - struct rtgui_dc *dc; - struct rtgui_rect rect; - struct rtgui_image *image; - - /* create start image */ - image = rtgui_image_create_from_mem("xpm", (const rt_uint8_t*)start_xpm, sizeof(start_xpm), RT_FALSE); - rtgui_widget_get_rect(RTGUI_WIDGET(object), &rect); - - dc = rtgui_dc_begin_drawing(RTGUI_WIDGET(object)); - dc_draw_bar(dc, _status_bar_pixels, &rect, RTGUI_HORIZONTAL); - - rect.x1 += 15; - rtgui_image_blit(image, dc, &rect); - - /* dispatch event */ - rtgui_container_dispatch_event(RTGUI_CONTAINER(object), event); - - rtgui_dc_end_drawing(dc); - rtgui_image_destroy(image); - } - break; - - case RTGUI_EVENT_MOUSE_BUTTON: - { - struct rtgui_event_mouse* emouse = (struct rtgui_event_mouse*)event; - struct rtgui_rect start_rect; - - rtgui_widget_get_extent(RTGUI_WIDGET(object), &start_rect); - start_rect.x1 += 15; - start_rect.x2 = start_rect.x1 + 48; - - /* it's not this widget event, clean status */ - if (rtgui_rect_contains_point(&start_rect, emouse->x, emouse->y) == RT_EOK && - emouse->button & (RTGUI_MOUSE_BUTTON_UP)) - { - rtgui_app_activate(rtgui_app_self()); - break; - } - - return RT_TRUE; - } - - default: - return rtgui_win_event_handler(object, event); - } - - return RT_FALSE; -} - -void statusbar_init(void) -{ - rtgui_rect_t rect; - struct rtgui_win* win; - - /* get scree rect */ - rtgui_get_screen_rect(&rect); - rect.y2 = rect.y1 + 50; - - /* create status bar window */ - win = rtgui_win_create(RT_NULL, "StatusBar", &rect, RTGUI_WIN_STYLE_NO_BORDER | - RTGUI_WIN_STYLE_NO_TITLE | RTGUI_WIN_STYLE_ONTOP); - rtgui_object_set_event_handler(RTGUI_OBJECT(win), statusbar_event_handler); - - rtgui_get_screen_rect(&rect); - rect.y1 = 50; - /* set the rect information of main window */ - rtgui_set_mainwin_rect(&rect); - - rtgui_win_show(win, RT_FALSE); -} - diff --git a/bsp/simulator/ui/statusbar.h b/bsp/simulator/ui/statusbar.h deleted file mode 100644 index 00de03a9d..000000000 --- a/bsp/simulator/ui/statusbar.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __STATUS_BAR_H__ -#define __STATUS_BAR_H__ - -#include -#include -#include -#include -#include -#include - -void statusbar_init(void); - -#endif diff --git a/bsp/simulator/ui/xpm/close.xpm b/bsp/simulator/ui/xpm/close.xpm deleted file mode 100644 index d9f38d9c9..000000000 --- a/bsp/simulator/ui/xpm/close.xpm +++ /dev/null @@ -1,188 +0,0 @@ -/* XPM */ -static const char *close_xpm[] = { -/* columns rows colors chars-per-pixel */ -"24 24 158 2", -" c #6D0F14", -". c #8F141A", -"X c #92151B", -"o c #A1171D", -"O c #A3171E", -"+ c #A4171E", -"@ c #A5171E", -"# c #A7181E", -"$ c #A8181F", -"% c #A11D24", -"& c #A81E25", -"* c #B41A21", -"= c #B51A21", -"- c #BE1B23", -"; c #AE282E", -": c #BC2129", -"> c #AE2E34", -", c #B82D33", -"< c #C01D24", -"1 c #C01D25", -"2 c #C31C24", -"3 c #C51E26", -"4 c #C61F27", -"5 c #C71F27", -"6 c #C12027", -"7 c #C3222A", -"8 c #C72029", -"9 c #C5242C", -"0 c #C5262E", -"q c #C82028", -"w c #C92029", -"e c #C8232B", -"r c #CB222A", -"t c #CB222B", -"y c #CD232C", -"u c #CA242C", -"i c #C9272F", -"p c #CD242D", -"a c #CE242C", -"s c #CE242D", -"d c #CF252E", -"f c #D0262E", -"g c #D1272F", -"h c #C82931", -"j c #CD2830", -"k c #CB2D34", -"l c #C82E35", -"z c #D32931", -"x c #D52A33", -"c c #D52B33", -"v c #D62A33", -"b c #D62B33", -"n c #D22D36", -"m c #D72C34", -"M c #D82D35", -"N c #D92D36", -"B c #D82F37", -"V c #DB2F38", -"C c #D53239", -"Z c #D93139", -"A c #DD3139", -"S c #DD313A", -"D c #DE313A", -"F c #DE323A", -"G c #DF323B", -"H c #DE333C", -"J c #E0333C", -"K c #E1343C", -"L c #E1343D", -"P c #E3363F", -"I c #D93C44", -"U c #E53841", -"Y c #E63841", -"T c #E83A42", -"R c #EB3C45", -"E c #EB3D46", -"W c #EC3D46", -"Q c #ED3D46", -"! c #EE3E47", -"~ c #B65A5F", -"^ c #BD5D61", -"/ c #B7696C", -"( c #BD6C70", -") c #D2454C", -"_ c #D8454C", -"` c #DD474E", -"' c #D0494F", -"] c #D14B51", -"[ c #DB4A51", -"{ c #DB4A52", -"} c #DC4A52", -"| c #DC4B52", -" . c #D35157", -".. c #D55259", -"X. c #D6535A", -"o. c #D4555B", -"O. c #D7545B", -"+. c #DF5259", -"@. c #DE555B", -"#. c #D9565C", -"$. c #DA575D", -"%. c #DB585E", -"&. c #E7464F", -"*. c #EE4049", -"=. c #ED464E", -"-. c #E3484F", -";. c #E64D54", -":. c #EE4B54", -">. c #E94F57", -",. c #F04D56", -"<. c #F14E57", -"1. c #E45158", -"2. c #E7545B", -"3. c #F1545D", -"4. c #DD5960", -"5. c #DE5A61", -"6. c #E05B62", -"7. c #E15D63", -"8. c #E25E64", -"9. c #E45F65", -"0. c #E55F66", -"q. c #EA5D64", -"w. c #EB5E65", -"e. c #F15E66", -"r. c #C46C71", -"t. c #C1797D", -"y. c #D37277", -"u. c #E56066", -"i. c #E9636A", -"p. c #EC676D", -"a. c #E1696F", -"s. c #E5696F", -"d. c #F0636B", -"f. c #E2747A", -"g. c #C7898C", -"h. c #DE8488", -"j. c #F1B8BB", -"k. c #F5BABD", -"l. c #EDC6C8", -"z. c #F3CACC", -"x. c #F6CBCD", -"c. c #F6CFD2", -"v. c #EFD5D6", -"b. c #EFDDDD", -"n. c #EFDDDE", -"m. c #F8D1D3", -"M. c #F0D8D9", -"N. c #F2DEDF", -"B. c #F3DEE0", -"V. c #FAE0E1", -"C. c #FBE4E5", -"Z. c #F4E8E8", -"A. c #F4E8E9", -"S. c #F7EEEE", -"D. c #FBF4F4", -"F. c #FEFEFE", -"G. c gray100", -"H. c None", -/* pixels */ -"H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.", -"H.H.H.k _ [ } { } } { } | { | | { | [ _ k H.H.H.", -"H.H.i i.d.3.<.<.<.<.<.<.<.<.<.<.<.<.,.:.&.0 H.H.", -"H.H.+.e.*.! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! Z H.H.", -"H.H.0.=.Q Q Q W Q Q W Q W Q Q W Q Q W Q Q L $ H.", -"H.H.u.E R R R R R R R R R R R R R R R R R K @ H.", -"H.H.9.T T T T T T T T T T T T T T T T T T G + H.", -"H.H.8.Y Y Y Y U Y w.q.Y Y >.p.Y U Y Y U Y A + H.", -"H.H.7.P P P P P 2.V.z.1.;.k.C.a.P P P P P V + H.", -"H.H.6.J J J J -.x.F.F.B.m.G.G.v.o.H J J J N + H.", -"H.H.5.F F F D F s.N.G.G.G.G.S.( , Z F F S m + H.", -"H.H.4.V V V V V V f.D.G.G.G.t.; n V V V V x + H.", -"H.H.%.M M M M M ` c.G.G.G.G.n.@.B M M M M z + H.", -"H.H.$.v c b b I j.G.G.A.b.F.G.l.) x b x b g + H.", -"H.H.#.z z z z C h.F.Z./ ^ M.G.g.> j z z z d + H.", -"H.H.O.f f f f f f y.~ & f ] r.% 9 f f f f y + H.", -"H.H.X.p s s s s p u : e s a 7 7 a s s a s r + H.", -"H.H...t t t t t t t t t t t t t t t t t t w + H.", -"H.H. .q q q q q q q q q q q q q q q q q q 5 O H.", -"H.H.' 8 5 5 5 5 5 5 5 5 5 4 5 5 4 5 5 4 5 1 X H.", -"H.H.l h 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 = H.H.", -"H.H.H.6 < 2 2 2 2 2 2 2 2 2 2 2 2 2 2 - * H.H.", -"H.H.H.H.H.# + + + + + + + + + + + + o . H.H.H.H.", -"H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H." -}; diff --git a/bsp/simulator/ui/xpm/exec.xpm b/bsp/simulator/ui/xpm/exec.xpm deleted file mode 100644 index dddaf0458..000000000 --- a/bsp/simulator/ui/xpm/exec.xpm +++ /dev/null @@ -1,93 +0,0 @@ -/* XPM */ -static const char *exec_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 55 1", -" c #1677A6", -". c #077AB4", -"X c #087AB4", -"o c #087BB4", -"O c #097BB4", -"+ c #087BB5", -"@ c #0A7CB5", -"# c #0F7EB5", -"$ c #0E7EB6", -"% c #1280B6", -"& c #1481B6", -"* c #1681B7", -"= c #1682B7", -"- c #1B82B6", -"; c #1782B8", -": c #1783B8", -"> c #178BD1", -", c #1B8ED2", -"< c #1C8ED2", -"1 c #399ED9", -"2 c #3EA0DA", -"3 c #40A1DA", -"4 c #51A9E1", -"5 c #54ABE1", -"6 c #98CDEC", -"7 c #9ACEEC", -"8 c #9BCFEE", -"9 c #A9D6F1", -"0 c #B8DDF5", -"q c #D5D5D5", -"w c #D4D5D6", -"e c #D5D6D6", -"r c #DBDBDA", -"t c #DADCDC", -"y c #DFDFDF", -"u c #DFE0E1", -"i c #C1E1F8", -"p c #E3E3E2", -"a c #E2E4E4", -"s c #E7E6E7", -"d c #E6E7E8", -"f c #EAEBEB", -"g c #ECEBEA", -"h c #EEEFEF", -"j c #F0EFEE", -"k c #F2F2F3", -"l c #F4F3F3", -"z c #F5F6F6", -"x c #F8F7F6", -"c c #F9F9FA", -"v c #FCFAFB", -"b c #FDFDFD", -"n c #FFFFFE", -"m c gray100", -"M c None", -/* pixels */ -"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM", -"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM", -"M-:=************************=:-M", -"M;8677777777777777777777777768;M", -"M&9>,<<<<<<<<<<<<<<<<<<<<<<,>9&M", -"M%0123333333333333333333333210%M", -"M#i45555555555555555555555554i#M", -"M@mmmmmmmmmmmmmmmmmmmmmmmmmmmm@M", -"M+mqweeeeeeeeeeeeeeeeeeeeeewqm+M", -"M+mrttttttttttttttttttttttttrm+M", -"MomyuuuuuuuuuuuuuuuuuuuuuuuuymoM", -"MompaaaaaaaaaaaaaaaaaaaaaaaapmoM", -"MomsddddddddddddddddddddddddsmoM", -"MomgffffffffffffffffffffffffgmoM", -"MXmjhhhhhhhhhhhhhhhhhhhhhhhhjmXM", -"M.mlkkkkkkkkkkkkkkkkkkkkkkkklm.M", -"M.mxzzzzzzzzzzzzzzzzzzzzzzzzxm.M", -"M.mvccccccccccccccccccccccccvm.M", -"M.mnbbbbbbbbbbbbbbbbbbbbbbbbnm.M", -"M.mmmmmmmmmmmmmmmmmmmmmmmmmmmm.M", -"M.mmmmmmmmmmmmmmmmmmmmmmmmmmmm.M", -"M.mmmmmmmmmmmmmmmmmmmmmmmmmmmm.M", -"M.mmmmmmmmmmmmmmmmmmmmmmmmmmmm.M", -"M.mmmmmmmmmmmmmmmmmmmmmmmmmmmm.M", -"M.mmmmmmmmmmmmmmmmmmmmmmmmmmmm.M", -"M.mmmmmmmmmmmmmmmmmmmmmmmmmmmm.M", -"MOmmmmmmmmmmmmmmmmmmmmmmmmmmmmOM", -"M$mmmmmmmmmmmmmmmmmmmmmmmmmmmm$M", -"M $O........................O$ M", -"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM", -"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM", -"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" -}; diff --git a/bsp/simulator/ui/xpm/home.xpm b/bsp/simulator/ui/xpm/home.xpm deleted file mode 100644 index 99eaec344..000000000 --- a/bsp/simulator/ui/xpm/home.xpm +++ /dev/null @@ -1,196 +0,0 @@ -/* XPM */ -static const char *home_xpm[] = { -/* columns rows colors chars-per-pixel */ -"48 48 142 2", -" c #2D2F31", -". c #2F3233", -"X c #313436", -"o c #3A3F42", -"O c #3E4144", -"+ c #3F4648", -"@ c #1C4365", -"# c #355C7C", -"$ c #414546", -"% c #434748", -"& c #44494C", -"* c #4C5355", -"= c #4F5658", -"- c #545555", -"; c #505759", -": c #525A5C", -"> c #5C5E5E", -", c #5C6062", -"< c #646565", -"1 c #6A6B6B", -"2 c #6E6F70", -"3 c #6F7171", -"4 c #707171", -"5 c #7A7A7A", -"6 c #1B4E82", -"7 c #1E5085", -"8 c #215286", -"9 c #2D588E", -"0 c #315D95", -"q c #376697", -"w c #35629A", -"e c #38659F", -"r c #3866A0", -"t c #2464B9", -"y c #2E69BA", -"u c #406E98", -"i c #4A76A5", -"p c #4F7CAB", -"a c #2D6AC9", -"s c #306AC1", -"d c #3367CC", -"f c #316DCE", -"g c #356DD3", -"h c #3472D4", -"j c #3378D7", -"k c #3E79D2", -"l c #457DD3", -"z c #7F8080", -"x c #5382B2", -"c c #5686B8", -"v c #598ABD", -"b c #2E84DB", -"n c #2B8DDF", -"m c #3186DC", -"M c #3288DC", -"N c #269AE4", -"B c #1DB5EE", -"V c #23A2E7", -"C c #21A7E8", -"Z c #20A9EA", -"A c #32AAE7", -"S c #26B8EE", -"D c #2BBDEF", -"F c #3DB1E9", -"G c #35BBED", -"H c #3BBEEE", -"J c #5E94CD", -"K c #5085D5", -"L c #4493DF", -"P c #559ADF", -"I c #6492D7", -"U c #6DA4DF", -"Y c #7BA3D0", -"T c #7CA8D3", -"R c #7CA2D9", -"E c #4E9DE0", -"W c #4DB9EA", -"Q c #54BBEA", -"! c #61A7E2", -"~ c #64AEE1", -"^ c #35C0EF", -"/ c #43C4EE", -"( c #4DC5EE", -") c #57C9EE", -"_ c #5CC9EE", -"` c #63C2EA", -"' c #65CEEF", -"] c #6EC8EB", -"[ c #79C6E9", -"{ c #848586", -"} c #878989", -"| c #8A8B8B", -" . c #8C8F90", -".. c #8F9090", -"X. c #939494", -"o. c #9C9D9D", -"O. c #9FA0A0", -"+. c #A2A3A3", -"@. c #ABACAC", -"#. c #AFB0B0", -"$. c #B0B1B1", -"%. c #BBBDBD", -"&. c #8AACD0", -"*. c #83ABDC", -"=. c #92B1DA", -"-. c #80B7E4", -";. c #85BFE4", -":. c #9ABEE0", -">. c #BFC0C0", -",. c #BBCFDE", -"<. c #86CFEB", -"1. c #9FC4E9", -"2. c #82D5ED", -"3. c #89D8EE", -"4. c #A4CAE6", -"5. c #A4D5E9", -"6. c #AEDBEA", -"7. c #AEE0EC", -"8. c #B3E2EC", -"9. c #C4C6C6", -"0. c #C7C9C9", -"q. c #CBCCCC", -"w. c #CFD4D8", -"e. c #D4D5D5", -"r. c #D6D8DB", -"t. c #DADBDB", -"y. c #C3D6E0", -"u. c #C6D9E3", -"i. c #C8DAE2", -"p. c #D3DDE4", -"a. c #D3DFE8", -"s. c #CBE1E8", -"d. c #D5E2EA", -"f. c #D5E9EA", -"g. c #D8EAEB", -"h. c #E7EAEE", -"j. c #EAEBEB", -"k. c #E9EDF1", -"l. c #EEF0F3", -"z. c #F4F4F4", -"x. c #FBFBFB", -"c. c None", -/* pixels */ -"c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.", -"c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.", -"c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.+.o.c.c.c.c.c.c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.w.w.w.w.w.r.x.x.x.x.z.t.@.X.5 $ : - 1 z 5 1 c.", -"c.1 1 < - , + , X.@.r.z.x.x.x.x.x.w.@ 7 8 8 8 7 7 8 8 8 7 6 # k.x.x.x.x.z.r.@.X.- * : - < 1 1 c.", -"c.1 < - & * o 1 @.r.z.x.x.x.x.x.x.p.8 &.,.y.i.T J i.i.y.Y t u l.x.x.x.x.x.z.r.@.> O & % - < 1 c.", -"c.c.c.c.c.X X { r.z.x.x.x.x.x.x.x.p.9 =.u.d.f.;.~ g.f.s.*.a i l.x.x.x.x.x.x.z.e.2 . c.c.c.c.c.", -"c.c.c.c.c.c.c.%.z.x.x.x.x.x.x.x.x.a.0 R 4.6.8.] Q 8.7.5.U f p l.x.x.x.x.x.x.x.j.$.c.c.c.c.c.c.c.", -"c.c.c.c.c.c.c.0.z.z.z.z.z.z.z.z.z.d.w I -.<.3.) / 3.2.[ P f x l.z.z.z.z.z.z.z.z.>.c.c.c.c.c.c.c.", -"c.c.c.c.c.c.c.q.z.z.z.z.z.z.z.z.z.d.w K ! ` ' / ^ ' _ Q L f x l.z.z.z.z.z.z.z.z.9.c.c.c.c.c.c.c.", -"c.c.c.c.c.c.c.r.z.z.z.z.z.z.z.z.z.d.e l E W ( ^ D / H A M f c k.z.z.z.z.z.z.z.z.e.c.c.c.c.c.c.c.", -"c.c.c.c.c.c.c.t.z.z.z.z.z.z.z.z.z.d.e k L F G S B B B V b f v k.z.z.z.z.z.z.z.z.t.c.c.c.c.c.c.c.", -"c.c.c.c.c.c.c.t.z.z.z.z.z.z.z.z.z.d.r h m N C Z Z Z C N b f v k.z.z.z.z.z.z.z.z.t.c.c.c.c.c.c.c.", -"c.c.c.c.c.c.c.t.z.z.z.z.z.z.z.z.z.d.r f j b n n n n n b j f v k.z.z.z.z.z.z.z.z.t.c.c.c.c.c.c.c.", -"c.c.c.c.c.c.c.t.j.j.j.j.j.j.j.j.j.d.e d g h h h h h h g g d v h.j.j.j.j.j.j.j.j.t.c.c.c.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c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.", -"c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c." -}; diff --git a/bsp/simulator/ui/xpm/home_gray.xpm b/bsp/simulator/ui/xpm/home_gray.xpm deleted file mode 100644 index c65dfd994..000000000 --- a/bsp/simulator/ui/xpm/home_gray.xpm +++ /dev/null @@ -1,224 +0,0 @@ -/* XPM */ -static const char *home_gray_xpm[] = { -/* columns rows colors chars-per-pixel */ -"48 48 170 2", -" c gray18", -". c #313131", -"X c #323232", -"o c #343434", -"O c gray23", -"+ c gray24", -"@ c gray25", -"# c gray26", -"$ c #434343", -"% c #444444", -"& c gray27", -"* c #464646", -"= c gray28", -"- c #484848", -"; c #494949", -": c gray30", -"> c #4E4E4E", -", c #505050", -"< c #515151", -"1 c gray32", -"2 c #535353", -"3 c gray33", -"4 c #555555", -"5 c #565656", -"6 c gray34", -"7 c #585858", -"8 c gray35", -"9 c #5A5A5A", -"0 c gray36", -"q c #5D5D5D", -"w c gray37", -"e c #5F5F5F", -"r c #606060", -"t c gray38", -"y c #626262", -"u c gray39", -"i c #646464", -"p c #656565", -"a c gray40", -"s c #676767", -"d c #686868", -"f c DimGray", -"g c #6A6A6A", -"h c gray42", -"j c #6C6C6C", -"k c gray43", -"l c gray44", -"z c #717171", -"x c #727272", -"c c gray45", -"v c #747474", -"b c gray46", -"n c #767676", -"m c #777777", -"M c gray47", -"N c #797979", -"B c gray48", -"V c #7B7B7B", -"C c #7C7C7C", -"Z c gray49", -"A c #7E7E7E", -"S c #7F7F7F", -"D c #808080", -"F c #818181", -"G c gray51", -"H c #838383", -"J c #848484", -"K c gray52", -"L c #868686", -"P c gray53", -"I c #888888", -"U c #898989", -"Y c gray54", -"T c #8B8B8B", -"R c gray55", -"E c #8D8D8D", -"W c #8E8E8E", -"Q c gray56", -"! c #909090", -"~ c gray57", -"^ c #929292", -"/ c #939393", -"( c gray58", -") c #959595", -"_ c #979797", -"` c #989898", -"' c gray60", -"] c #9A9A9A", -"[ c #9B9B9B", -"{ c gray61", -"} c #9D9D9D", -"| c gray62", -" . c #9F9F9F", -".. c #A0A0A0", -"X. c gray63", -"o. c #A2A2A2", -"O. c gray64", -"+. c #A4A4A4", -"@. c #A5A5A5", -"#. c gray66", -"$. c #A9A9A9", -"%. c #AAAAAA", -"&. c gray67", -"*. c #ACACAC", -"=. c gray68", -"-. c #AEAEAE", -";. c #AFAFAF", -":. c gray69", -">. c #B1B1B1", -",. c #B2B2B2", -"<. c #B6B6B6", -"1. c #B7B7B7", -"2. c #B9B9B9", -"3. c #BCBCBC", -"4. c gray74", -"5. c gray", -"6. c gray75", -"7. c #C1C1C1", -"8. c gray76", -"9. c #C3C3C3", -"0. c gray77", -"q. c #C5C5C5", -"w. c #C6C6C6", -"e. c gray78", -"r. c #C8C8C8", -"t. c gray79", -"y. c #CACACA", -"u. c gray80", -"i. c #CDCDCD", -"p. c gray81", -"a. c #D0D0D0", -"s. c #D2D2D2", -"d. c LightGray", -"f. c gray83", -"g. c #D5D5D5", -"h. c gray84", -"j. c #D7D7D7", -"k. c #D8D8D8", -"l. c gray85", -"z. c #DADADA", -"x. c gray86", -"c. c gainsboro", -"v. c #DDDDDD", -"b. c gray87", -"n. c #DFDFDF", -"m. c #E2E2E2", -"M. c #E4E4E4", -"N. c gray91", -"B. c #E9E9E9", -"V. c #EAEAEA", -"C. c gray92", -"Z. c #ECECEC", -"A. c gray93", -"S. c #EEEEEE", -"D. c #EFEFEF", -"F. c gray94", -"G. c #F1F1F1", -"H. c gray95", -"J. c #F3F3F3", -"K. c #F4F4F4", -"L. c gray96", -"P. c #F6F6F6", -"I. c gray97", -"U. c #F8F8F8", -"Y. c #F9F9F9", -"T. c gray98", -"R. c #FBFBFB", -"E. c gray99", -"W. c #FDFDFD", -"Q. c None", -/* pixels */ -"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.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.", -"Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.", -"Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q." -}; diff --git a/bsp/simulator/ui/xpm/start.xpm b/bsp/simulator/ui/xpm/start.xpm deleted file mode 100644 index 4e400a927..000000000 --- a/bsp/simulator/ui/xpm/start.xpm +++ /dev/null @@ -1,310 +0,0 @@ -/* XPM */ -static const char *start_xpm[] = { -/* columns rows colors chars-per-pixel */ -"48 48 256 2", -" c #542700", -". c #305810", -"X c #3C6C0A", -"o c #3B630A", -"O c #3E710B", -"+ c #3D6F39", -"@ c #3A6C21", -"# c #4A5306", -"$ c #41750C", -"% c #44780E", -"& c #4A7C12", -"* c #457916", -"= c #40713D", -"- c #417428", -"; c #7A0B42", -": c #542B56", -"> c #54315E", -", c #4B2E58", -"< c #65285B", -"1 c #563461", -"2 c #5B3464", -"3 c #5F3868", -"4 c #633B6B", -"5 c #663668", -"6 c #75376B", -"7 c #2F5C40", -"8 c #1D4374", -"9 c #3A6775", -"0 c #694271", -"q c #6C4E74", -"w c #754E7B", -"e c #79547D", -"r c #73557A", -"t c #65476E", -"y c #457265", -"u c #830105", -"i c #9F1E04", -"p c #960609", -"a c #A40303", -"s c #B73B1D", -"d c #990C32", -"f c #BD2F2F", -"g c #BA3837", -"h c #C12E2E", -"j c #C13030", -"k c #C83D3D", -"l c #C63A3A", -"z c #B55100", -"x c #BD5400", -"c c #B45E01", -"v c #A74700", -"b c #996104", -"n c #B57418", -"m c #BC690D", -"M c #BB4534", -"N c #847E22", -"B c #AD7C21", -"V c #C35301", -"C c #C65800", -"Z c #CC5C01", -"A c #CA580B", -"S c #D15F01", -"D c #C5541D", -"F c #CB6307", -"G c #D36305", -"H c #D6690E", -"J c #D96807", -"K c #DD751B", -"L c #E06B03", -"P c #EA770A", -"I c #F07D0E", -"U c #E77C19", -"Y c #C75C33", -"T c #8C0D4C", -"R c #900D4F", -"E c #950E52", -"W c #9B0E55", -"Q c #9C1256", -"! c #9F1158", -"~ c #8D1755", -"^ c #A80E5B", -"/ c #A2125B", -"( c #A4185A", -") c #B23A56", -"_ c #AA2B5C", -"` c #BB0B63", -"' c #B61866", -"] c #A91E63", -"[ c #89346C", -"{ c #833F71", -"} c #9F3771", -"| c #B8286D", -" . c #B23B60", -".. c #BE2A71", -"X. c #AB3871", -"o. c #BC3674", -"O. c #AC2366", -"+. c #C5146B", -"@. c #C7196D", -"#. c #C81A6F", -"$. c #C91D71", -"%. c #C20C66", -"&. c #CB2475", -"*. c #CE2C79", -"=. c #C42270", -"-. c #D02E7C", -";. c #CD357D", -":. c #C43778", -">. c #D1327E", -",. c #BC4A4E", -"<. c #BB4D60", -"1. c #AF447B", -"2. c #CC4646", -"3. c #CC4A4A", -"4. c #C64D4D", -"5. c #D04F4F", -"6. c #C15656", -"7. c #D25252", -"8. c #D65C5C", -"9. c #D85E5E", -"0. c #C2544C", -"q. c #C35F69", -"w. c #CB6362", -"e. c #C56364", -"r. c #DD6A6A", -"t. c #D76666", -"y. c #D87171", -"u. c #E17373", -"i. c #E47878", -"p. c #4F8019", -"a. c #4F8116", -"s. c #538419", -"d. c #5A881B", -"f. c #5C8C23", -"g. c #5A8722", -"h. c #6B8F2E", -"j. c #68942A", -"k. c #709B32", -"l. c #79A136", -"z. c #7BA541", -"x. c #809D3F", -"c. c #92993F", -"v. c #95882B", -"b. c #A2882D", -"n. c #81A739", -"m. c #85A93D", -"M. c #80A537", -"N. c #F5800D", -"B. c #F58414", -"V. c #F6891C", -"C. c #F68718", -"Z. c #E68123", -"A. c #F68D23", -"S. c #F7912A", -"D. c #F8942D", -"F. c #F79027", -"G. c #E78931", -"H. c #EF9338", -"J. c #F89631", -"K. c #F89835", -"L. c #F69839", -"P. c #F99C3B", -"I. c #F19133", -"U. c #86AB41", -"Y. c #8AAE44", -"T. c #8BAB4C", -"R. c #88A446", -"E. c #8DB047", -"W. c #8DB14A", -"Q. c #92B54D", -"!. c #93B452", -"~. c #97B952", -"^. c #99BB56", -"/. c #9DBE5A", -"(. c #96BA58", -"). c #EF9C4A", -"_. c #F99F40", -"`. c #FAA144", -"'. c #FAA54B", -"]. c #F6A047", -"[. c #FBAA53", -"{. c #FBAF5B", -"}. c #F4A451", -"|. c #FCB15E", -" X c #FCB463", -".X c #9FC05C", -"XX c #A1C15E", -"oX c #9DC060", -"OX c #A4C462", -"+X c #A8C867", -"@X c #ACCB6B", -"#X c #B0CF71", -"$X c #1F4985", -"%X c #234A86", -"&X c #244D89", -"*X c #294D87", -"=X c #3A669E", -"-X c #356184", -";X c #3969A6", -":X c #3765A0", -">X c #7C5681", -",X c #7D5B82", -" UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX", -"UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX3 FXLXKXJXHXsXe 2 UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX", -"UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX> qXKXJXHXGXFXsXsXyX0 > UXUXUXUXUXUXUXUXUXUXUXUXUXUXUX", -"UXUXUXUXUXUXUXUXUXUXUXUXUXUXT E UXUXUXUXUX4 GXJXHXFXsXsXpXpXiX0 UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX", -"UXUXUXUXUXUXUXUXUXUXUXUXUXW | O.UXUXUXUX1 rXHXGXFXsXsXpXiXuXqX2 UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX",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UXUX/ @.$.&.&.*.-.>.;.:.~ < , %X=X-X+ p.T.@X#X@Xp.9 :X;X;X;X;X%XUXUXUXUXUXUX", -"UXUXUXUXUXUXUXUXUXUXUXUXT ' +.#.$.&.&.*.>.;.( ; UX8 7 * l.OX+X@X@X@XW.@ 8 $X$X$X$X$XUXUXUXUXUXUX", -"UXUXUXUXUXUXUXa a a a a p W ` +.@.$.&.&.' ! d u o g.!..XXXOX+X+X@X@Xf.. UXUXUXUXUXUXUXUXUXUXUX", -"UXUXUXUXUXUXUXa u.i.i.i.y. .^ %.+.+.' / _ q.e.i Z c N T.^./.XXOXOX+X+X(.$ UXUXUXUXUXUXUXUXUXUXUX", -"UXUXUXUXUXUXUXa r.u.u.u.y.e.( ` ` ^ ( <.e.y.w.V ).).H n c.!.^..XXXOXOX+Xj.X UXUXUXUXUXUXUXUXUXUX", -"UXUXUXUXUXUXUXa t.r.r.r.r.w.) W Q ) 6.w.t.t.Y K X X{.G.F B R.!./.XXOXOX/.& UXUXUXUXUXUXUXUXUXUX", -"UXUXUXUXUXUXUXa 8.9.9.9.9.8.6.) ,.6.8.9.8.0.A }.|.{.[.[.].K F b.T.^./.XXOXl.O UXUXUXUXUXUXUXUXUX", -"UXUXUXUXUXUXUXa 5.7.7.7.7.7.4.,.4.7.7.7.4.D Z.{.{.[.[.'.'.`.I.H n R.^./..X/.s.UXUXUXUXUXUXUXUXUX", -"UXUXUXUXUXUXUXa 2.2.2.2.2.2.2.2.2.2.2.2.M G [.[.[.'.'.`._.P.L.H b.T.~.^.^./.U.$ UXUXUXUXUXUXUXUX", -"UXUXUXUXUXUXUXa l k k k k k k k k k k g A G.[.'.'.`.`.P.P.K.Z.m x.W.Q.~.~.^./.g.UXUXUXUXUXUXUXUX", -"UXUXUXUXUXUXUXa h j j j j j j j j j f s H '.'.'.`._.P.K.K.D.G v.U.E.W.Q.Q.~.^.W.% UXUXUXUXUXUXUX", -"UXUXUXUXUXUXUXa a a a a a a a a a a p V H.'.`.`.P.P.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