mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-09 20:45:41 +08:00
add realtouch ui code to bsp/simulator
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2442 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
1 parent
12e47d0497
commit
c1f7aa1ca7
20 files changed
+2650
No files matched your search
@@ -0,0 +1,8 @@
|
||||
Import('RTT_ROOT')
|
||||
from building import *
|
||||
|
||||
src = Glob('*.c')
|
||||
|
||||
group = DefineGroup('ui', src, depend = [''])
|
||||
|
||||
Return('group')
|
||||
@@ -0,0 +1,31 @@
|
||||
#include <rtthread.h>
|
||||
|
||||
#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;
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
#include "appmgr.h"
|
||||
#include <rtgui/widgets/panel.h>
|
||||
#include <rtgui/widgets/notebook.h>
|
||||
#include <rtgui/widgets/listbox.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef __APPMGR_H__
|
||||
#define __APPMGR_H__
|
||||
|
||||
#include <rtgui/rtgui_app.h>
|
||||
#include <rtgui/widgets/window.h>
|
||||
#include <rtgui/widgets/label.h>
|
||||
#include <rtgui/widgets/box.h>
|
||||
#include <rtgui/widgets/panel.h>
|
||||
|
||||
void app_mgr_win_init(void);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,11 @@
|
||||
#ifndef __APPS_LIST_H__
|
||||
#define __APPS_LIST_H__
|
||||
|
||||
#include <rtgui/event.h>
|
||||
#include <rtgui/rtgui_object.h>
|
||||
#include <rtgui/widgets/panel.h>
|
||||
|
||||
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
|
||||
@@ -0,0 +1,118 @@
|
||||
#include <rtgui/dc.h>
|
||||
#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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#ifndef __BLOCK_PANEL_H__
|
||||
#define __BLOCK_PANEL_H__
|
||||
#include <rtgui/widgets/panel.h>
|
||||
|
||||
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
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,57 @@
|
||||
#include <rtthread.h>
|
||||
#include <rtgui/rtgui_app.h>
|
||||
#include <rtgui/widgets/window.h>
|
||||
#include <rtgui/widgets/label.h>
|
||||
|
||||
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);
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,187 @@
|
||||
#include <rtthread.h>
|
||||
#include <rtgui/rtgui_server.h>
|
||||
#include <rtgui/rtgui_system.h>
|
||||
#include <rtgui/rtgui_app.h>
|
||||
#include <rtgui/widgets/window.h>
|
||||
#include <rtgui/widgets/list_view.h>
|
||||
#include <rtgui/rtgui_xml.h>
|
||||
#include <rtgui/widgets/panel.h>
|
||||
|
||||
#ifdef _WIN32_NATIVE
|
||||
#include <io.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
#define PATH_SEPARATOR '\\'
|
||||
#else
|
||||
#include <dfs_posix.h>
|
||||
#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);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#include <rtthread.h>
|
||||
#include <rtgui/rtgui_server.h>
|
||||
#include <rtgui/rtgui_system.h>
|
||||
#include <rtgui/rtgui_app.h>
|
||||
#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
|
||||
}
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
#include "statusbar.h"
|
||||
#include <rtgui/dc.h>
|
||||
#include <rtgui/image.h>
|
||||
#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);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef __STATUS_BAR_H__
|
||||
#define __STATUS_BAR_H__
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <rtgui/rtgui_app.h>
|
||||
#include <rtgui/widgets/window.h>
|
||||
#include <rtgui/widgets/label.h>
|
||||
#include <rtgui/widgets/box.h>
|
||||
#include <rtgui/widgets/panel.h>
|
||||
|
||||
void statusbar_init(void);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,188 @@
|
||||
/* 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."
|
||||
};
|
||||
@@ -0,0 +1,93 @@
|
||||
/* 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"
|
||||
};
|
||||
@@ -0,0 +1,196 @@
|
||||
/* 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.",
|
||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; - 1 | o...c.c.c.",
|
||||
"c.c.{ o.} 1 - ; $ 5 X.@.t.z.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.z.t.@.X.5 $ ; - 1 } o.{ c.c.",
|
||||
"c.1 5 z 1 - ; $ 5 X.@.t.z.x.x.x.x.z.w.w.w.w.w.w.w.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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j.j.j.j.j.j.j.j.%.c.c.c.c.c.c.c.",
|
||||
"c.c.c.c.c.c.c.X.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.5 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.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."
|
||||
};
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user