状态栏正确闭环(agent-142): 系统进程统一渲染+App不画+覆盖叠加+数据唯一+MD3图标式+主题换图标
- meow_ui_sys_set_system_mode: launcher置1才渲染, App默认0→不画状态栏; app_overlay_statusbar在launch_app循环~1s叠加28px顶条(不SIGSTOP App) - 数据源唯一(launcher g_sys→meow_ui_sys_feed; wifi_level/batt/vol/bri/clock), 根治"launcher有亮度App没有" - 右侧=MD3图标+变量值(statusbar_right_str文本退役→图标簇, 复用sb_icons.h/MEOW_SB_ICON_*/meow_gfx_blit_icon); 颜色随meow_theme - ui.style换图标集(meow_ui_style/set_style读ui.style md3/miuix, MIUIx暂MD3占位) - hello最小改动(redraw非全屏只清inset=28之下, 不冲系统顶条); 开放点: App不SIGSTOP/inset28/MIUIx占位/set_statusbar系统模式门 - meow_ui.a=3da5af7b launcher=a2b1c096 hello=67075741 0warning; 宿主test_sb_statusbar ALL PASS + render PPM目检(左时钟右亮度/WiFi/蓝牙/音量/电量) - 遗留: 真机验证(无双画/数据一致/顶条叠加/inset/ui.style); 运行时fullscreen沉浸叠画待M3; MIUIx图标占位
This commit is contained in:
1 parent
9f4143af22
commit
c0f78750d4
10 files changed
+636
-36
No files matched your search
@@ -276,6 +276,17 @@ void meow_theme_remove_listener(meow_theme_listener cb);
|
||||
/* [D4] 脱机访问两套内置色板(无 settings 文件也可靠):返回当前解析生效的色板副本。 */
|
||||
meow_theme meow_theme_defaults(meow_theme_mode m);
|
||||
|
||||
/* ---- §8.1 顶级主题风格族(minimal,2026-08-30)----
|
||||
* 主题 = 顶级主题风格族(ui.style:MD3/MIUIx)× 明暗(display.theme)。本批只落「状态栏图标集
|
||||
* 随 ui.style 换集」的最小闭环:meow_ui_set_style 记录 style(同值忽略)+ 触发 theme_reload/
|
||||
* 广播(让状态栏/控件下一帧用新 style 重绘)。style 还决定状态栏右侧图标集(§3.1 同一个状态栏)。
|
||||
* 完整 style×mode 配色/控件形态矩阵(§8.1.3)为后续里程碑。 */
|
||||
#define MEOW_STYLE_MD3 0 /* Material You(默认) */
|
||||
#define MEOW_STYLE_MIUIX 1 /* MIUI 风格族(基础占位) */
|
||||
|
||||
void meow_ui_set_style(int style); /* 设顶级主题风格族;越界 clamp 到合法值;同值忽略 */
|
||||
int meow_ui_style(void); /* 当前 style(默认 MEOW_STYLE_MD3) */
|
||||
|
||||
/* ============================================================ */
|
||||
/* §9 应用日志(统一日志 API,M2.51 最小可用版) */
|
||||
/* ============================================================ */
|
||||
|
||||
+62
-1
@@ -11,6 +11,7 @@
|
||||
#include "meow_ui.h"
|
||||
#include "meow_ui_internal.h"
|
||||
#include "meow_ui_sys.h"
|
||||
#include "sb_icons.h"
|
||||
#include "../meow_launcherd/meow_font.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -181,6 +182,66 @@ void meow_gfx_mark_full(void) { dirty_full(); }
|
||||
* 从而 launcher 与 app 统一渲染栈(同一离屏 + 同一 present)。 */
|
||||
unsigned char *meow_ui_back_buf(void) { return g_back_buf; }
|
||||
|
||||
/* ================= 状态栏 MD3 图标 blit(写进本 SDK back_buf) =================
|
||||
* 复用 launcher sb_icons.h(Material Symbols rounded,32x32 单通道 alpha)作为状态栏
|
||||
* 右侧图标簇(「同一个状态栏」图标式,见 meow_ui_sys_statusbar_render)。
|
||||
* idx = sb_icons[] 索引(SB_I_*,见 meow_ui_internal.h)
|
||||
* x = 图标槽左缘(槽宽 SB_ICON_SIZE=32)
|
||||
* y = 图标槽顶(仅作参考;实际按 ink 垂直中心对齐 cy)
|
||||
* ink_h = 目标 ink 高(>0 等比缩放;0 = 保持位图自然 ink 尺寸——WiFi 强弱档用)
|
||||
* fg = 24-bit RGB 前景(主题 on_surface / on_surface_variant,日/夜由主题表提供)
|
||||
* cy = ink 垂直中心线(= 状态栏文字中心,28px 栏约 14)
|
||||
* 先求位图 ink 边界(阈值 32,忽略近透明抗锯齿),按 ink 在槽内水平居中、垂直中心对齐 cy;
|
||||
* 像素按 alpha 软边混合进 back_buf(自 g_fb/g_line/g_xres/g_yres,与 launcher sb_blit_icon 同源算法)。 */
|
||||
void meow_gfx_blit_icon(int idx, int x, int y, int ink_h, uint32_t fg, int cy)
|
||||
{
|
||||
(void)y;
|
||||
if (!g_init_ok || !g_fb) return;
|
||||
if (idx < 0 || idx >= (int)(sizeof sb_icons / sizeof sb_icons[0])) return;
|
||||
const unsigned char *src = sb_icons[idx].data;
|
||||
uint16_t col = rgb565(fg);
|
||||
/* 1) ink 边界(含空图兜底) */
|
||||
int minx = SB_ICON_SIZE, miny = SB_ICON_SIZE, maxx = -1, maxy = -1;
|
||||
for (int i = 0; i < SB_ICON_SIZE * SB_ICON_SIZE; i++) {
|
||||
if (src[i] >= 32) {
|
||||
int xx = i % SB_ICON_SIZE, yy = i / SB_ICON_SIZE;
|
||||
if (xx < minx) minx = xx; if (xx > maxx) maxx = xx;
|
||||
if (yy < miny) miny = yy; if (yy > maxy) maxy = yy;
|
||||
}
|
||||
}
|
||||
if (maxx < minx || maxy < miny) { minx = miny = 0; maxx = maxy = SB_ICON_SIZE - 1; }
|
||||
int ink_w = maxx - minx + 1, ink_h_n = maxy - miny + 1;
|
||||
int t_h = (ink_h > 0) ? ink_h : ink_h_n;
|
||||
int t_w = ink_w * t_h / ink_h_n; if (t_w < 1) t_w = 1;
|
||||
if (t_w > SB_ICON_SIZE * 2) t_w = SB_ICON_SIZE * 2; /* 防御:等比极端上限 */
|
||||
/* 2) 目标框左上:水平居中于 32px 槽;垂直中心 = cy */
|
||||
int x0 = x + (SB_ICON_SIZE - t_w) / 2;
|
||||
int y0 = cy - t_h / 2;
|
||||
/* 3) 最近邻采样映射:目标 (dx,dy) ← 源 ink */
|
||||
for (int dy = 0; dy < t_h; dy++) {
|
||||
int ty = y0 + dy;
|
||||
if (ty < 0 || ty >= g_yres) continue;
|
||||
int sy = miny + (dy * ink_h_n) / t_h;
|
||||
uint16_t *row = (uint16_t *)(g_fb + (size_t)ty * g_line);
|
||||
for (int dx = 0; dx < t_w; dx++) {
|
||||
int tx = x0 + dx;
|
||||
if (tx < 0 || tx >= g_xres) continue;
|
||||
int sx = minx + (dx * ink_w) / t_w;
|
||||
int a = src[sy * SB_ICON_SIZE + sx];
|
||||
if (a < 8) continue; /* 透明像素跳过 */
|
||||
uint16_t bg = row[tx];
|
||||
if (a >= 240) { row[tx] = col; continue; }
|
||||
int a4 = a >> 4; /* 0..15 */
|
||||
int r = ((col >> 11) * a4 + ((bg >> 11) & 0x1F) * (16 - a4)) >> 4;
|
||||
int g = (((col >> 5) & 0x3F) * a4 + ((bg >> 5) & 0x3F) * (16 - a4)) >> 4;
|
||||
int b = ((col & 0x1F) * a4 + (bg & 0x1F) * (16 - a4)) >> 4;
|
||||
row[tx] = (uint16_t)((r << 11) | (g << 5) | b);
|
||||
}
|
||||
}
|
||||
/* 整条顶栏作为脏区标出(图标在顶条内,present 只重画顶条即可) */
|
||||
dirty_add(x, 0, SB_ICON_SIZE, MUI_SBAR_H);
|
||||
}
|
||||
|
||||
/* ================= 像素写入 ================= */
|
||||
static void px_write_rgb565(int x, int y, uint16_t c16)
|
||||
{
|
||||
@@ -663,7 +724,7 @@ static void present(void)
|
||||
* 顶条被 app 内容触及 / 上收动画未到位(逐帧推进)。展开态仍走
|
||||
* meow_ui_sys_statusbar_render()(meow_ui_sys.c 不改,留给后续代理);
|
||||
* 上收折叠态(collapse_h>=MUI_SBAR_H)由基座只画提示线(内容上移出屏)。 */
|
||||
if (meow_ui_sys_statusbar_active() &&
|
||||
if (meow_ui_sys_render_enabled() && meow_ui_sys_statusbar_active() &&
|
||||
(meow_ui_sys_statusbar_force() || statusbar_touched() ||
|
||||
statusbar_collapse_in_transition())) {
|
||||
statusbar_collapse_step();
|
||||
|
||||
+5
-2
@@ -380,12 +380,15 @@ void meow_ui_run(const meow_ui_events *ev)
|
||||
}
|
||||
|
||||
/* A-0 全局状态栏 1s 轻刷:电量/WiFi/音量 + 时钟。时钟每秒变 → 重画顶条并上屏,
|
||||
* 即使 APP 空闲(未主动 flush)也保持时钟走动。 */
|
||||
* 即使 APP 空闲(未主动 flush)也保持时钟走动。
|
||||
* 「同一个状态栏」闭环:仅系统进程(launcher)刷新顶条;App 进程不渲染状态栏,
|
||||
* 此处不再 flush 顶条(避免把 launcher 叠画的系统顶条冲成 App 背景)。数据仍刷新
|
||||
* (meow_ui_sys_refresh 无副作用),App 侧 inset/热区不受影响。 */
|
||||
static uint64_t last_sys_ms = 0;
|
||||
if (now - last_sys_ms >= 1000) {
|
||||
last_sys_ms = now;
|
||||
meow_ui_sys_refresh();
|
||||
if (meow_ui_sys_statusbar_active())
|
||||
if (meow_ui_sys_render_enabled() && meow_ui_sys_statusbar_active())
|
||||
meow_ui_flush_region(0, 0, meow_ui_width(), MUI_SBAR_H);
|
||||
}
|
||||
|
||||
|
||||
+52
-1
@@ -19,7 +19,9 @@
|
||||
typedef struct meow_ui_feed {
|
||||
int batt; /* 电量 %,-1 未知 */
|
||||
int charging; /* 1 充电/满 0 放电 */
|
||||
int wifi_on; /* 1 网卡 up(operstate==up) */
|
||||
int wifi_on; /* 1 网卡 up(射频开) */
|
||||
int wifi_connected;/* 1 已关联 AP(operstate up);WiFi 图标分档用 */
|
||||
int wifi_level; /* 信号 dBm(<-1000=未知);≥-60 强 / -75 中 / 更弱弱 */
|
||||
int bt_seen; /* hci0 节点存在 */
|
||||
int bt_on; /* 实际上电 */
|
||||
int vol; /* 音量 0-100 */
|
||||
@@ -27,6 +29,55 @@ typedef struct meow_ui_feed {
|
||||
} meow_ui_feed;
|
||||
void meow_ui_sys_feed(const meow_ui_feed *f); /* 喂权威快照 + 置 force 重绘顶条 */
|
||||
|
||||
/* ---- 系统 UI 模式(「同一个状态栏」闭环,§3.1 / FRAMEWORK_DESIGN §10.2)----
|
||||
* 状态栏 = 系统级组件,仅系统进程(launcher)渲染。SDK 在 App 进程与 launcher 进程都链接,
|
||||
* 但顶条/提示线的**渲染**仅当本进程为系统 UI(launcher 置 system_mode=1)才进行;App 进程
|
||||
* 不渲染(meow_ui_sys_statusbar_active()/meow_ui_statusbar_height() 不受此开关影响 → App 仍
|
||||
* inset 28、热区可用,只是不画顶条、由 launcher 叠加)。launcher init 后调
|
||||
* meow_ui_sys_set_system_mode(1);App 保持默认 0。 */
|
||||
void meow_ui_sys_set_system_mode(int on); /* 1=本进程为系统 UI(渲染顶条/提示线) */
|
||||
int meow_ui_sys_render_enabled(void); /* 当前进程是否渲染系统顶条 */
|
||||
/* 把全局状态栏画进本进程 back_buf 顶部 MUI_SBAR_H 行(仅系统进程调用,见 render_enabled)。
|
||||
* launcher 的 App 前台叠加(launch_app 循环)直接调它 + 标脏顶条上屏。实现见 meow_ui_sys.c。 */
|
||||
void meow_ui_sys_statusbar_render(void);
|
||||
|
||||
/* ---- 状态栏 MD3 图标簇(meow_ui_sys.c 渲染右侧;位图在 SDK 侧 sb_icons.h)----
|
||||
* meow_ui_gfx.c 的 meow_gfx_blit_icon(idx,...) 用这些索引查 sb_icons[]。
|
||||
* 索引值与 launcher sb_icons.h 的 SB_I_* 一一对应(位图同源,勿改序)。 */
|
||||
#define MEOW_SB_ICON_WIFI 0
|
||||
#define MEOW_SB_ICON_BT 1
|
||||
#define MEOW_SB_ICON_BATT 2
|
||||
#define MEOW_SB_ICON_VOL 3
|
||||
#define MEOW_SB_ICON_BRIGHT 4
|
||||
#define MEOW_SB_ICON_WIFI_STRONG 5
|
||||
#define MEOW_SB_ICON_WIFI_MEDIUM 6
|
||||
#define MEOW_SB_ICON_WIFI_WEAK 7
|
||||
#define MEOW_SB_ICON_WIFI_NO 8
|
||||
#define MEOW_SB_ICON_WIFI_OFF 9
|
||||
#define MEOW_SB_ICON_BT_NO 10
|
||||
#define MEOW_SB_ICON_BT_CONN 11
|
||||
#define MEOW_SB_ICON_BT_DIS 12
|
||||
#define MEOW_SB_ICON_BT_SEARCH 13
|
||||
|
||||
/* 状态栏右下布局常量(与 launcher SB_* 对齐):图标右缘↔文字间隙 / 相邻项间隙 / 图标目标 ink 高 /
|
||||
* 右簇左缘相对时钟右缘安全间距 / 图标 ink 垂直中心(=状态栏文字中心,28px 栏约 14)。 */
|
||||
#define MEOW_SB_TGAP 6
|
||||
#define MEOW_SB_XGAP 10
|
||||
#define MEOW_SB_ICON_INK 16
|
||||
#define MEOW_SB_CLK_MARGIN 14
|
||||
#define MEOW_SB_ICON_CY 14
|
||||
#define MEOW_SB_ICON_SIZE 32 /* 图标槽宽(= sb_icons.h SB_ICON_SIZE,勿改序) */
|
||||
|
||||
/* 把第 idx 个 MD3 图标(sb_icons[])按 ink 等比 blit 进 back_buf;x=槽左缘、ink_h=目标 ink 高
|
||||
* (0=自然 ink,WiFi 强弱档用)、fg=24bit 前景、cy=ink 垂直中心线。见 meow_ui_gfx.c。 */
|
||||
void meow_gfx_blit_icon(int idx, int x, int y, int ink_h, uint32_t fg, int cy);
|
||||
|
||||
/* ---- 顶级主题风格族(§8.1.2,minimal):状态栏图标集/配色随 ui.style(md3/miuix)----
|
||||
* meow_ui_theme.c 实现:读 settings.conf 的 ui.style(md3→0 / miuix→1),缓存,随
|
||||
* meow_theme_reload() 重读。launcher settings 改 ui.style 后经 sb_sdk_refresh→theme_reload
|
||||
* →本值更新 → 状态栏图标集跟手切。公共版见 meow_ui.h(meow_ui_set_style/meow_ui_style)。 */
|
||||
int meow_ui_style(void);
|
||||
|
||||
/* ---- 主题(meow_ui_theme.c 提供)----
|
||||
* 重置主题缓存,使下一次 meow_theme_get() 重读 settings.conf(display.theme /
|
||||
* display.theme_mode / display.theme_dark_start|end)。launcher 在 statusbar 刷新前调用,
|
||||
|
||||
+91
-31
@@ -35,6 +35,10 @@ static int g_sys_inited = 0;
|
||||
static int g_statusbar_on = 1; /* 默认显示 */
|
||||
static int g_fullscreen = 0; /* 默认非全屏 */
|
||||
static int g_statusbar_force = 0; /* 1s 刷新后置位,强制重画顶部条 */
|
||||
/* 「同一个状态栏」闭环(§3.1/FRAMEWORK_DESIGN §10.2):状态栏 = 系统级组件,仅系统进程
|
||||
* (launcher) 渲染。g_sys_render=1 表示本进程是系统 UI —— meow_ui_sys_statusbar_render /
|
||||
* present() 据此决定是否画出顶条/提示线;App 进程保持 0(不渲染)+ 仍 inset 28(launcher 叠加)。 */
|
||||
static int g_sys_render = 0; /* 1=本进程为系统 UI(渲染);0=App(不渲染,仅 inset) */
|
||||
|
||||
static uint64_t now_ms(void)
|
||||
{
|
||||
@@ -129,7 +133,9 @@ void meow_ui_sys_refresh(void)
|
||||
|
||||
char op[16];
|
||||
read_str("/sys/class/net/wlan0/operstate", op, sizeof op);
|
||||
g_sys.wifi_on = !strcmp(op, "up") ? 1 : 0;
|
||||
g_sys.wifi_connected = !strcmp(op, "up") ? 1 : 0;
|
||||
g_sys.wifi_on = g_sys.wifi_connected; /* SDK 自身读不到射频 vs 关联的区分,一起走 operstate */
|
||||
g_sys.wifi_level = -1000; /* 信号分档由 launcher 喂(唯一权威源);SDK 不读 /proc 无线 */
|
||||
|
||||
g_sys.vol = settings_vol();
|
||||
g_sys.brightness = settings_bright(); /* 兜底读 settings;launcher 喂入会覆盖(更即时) */
|
||||
@@ -159,18 +165,36 @@ const meow_sys_state *meow_ui_sys_get(void) { return &g_sys; }
|
||||
void meow_ui_sys_feed(const meow_ui_feed *f)
|
||||
{
|
||||
if (!f) return;
|
||||
g_sys.batt = f->batt;
|
||||
g_sys.charging = f->charging;
|
||||
g_sys.wifi_on = f->wifi_on;
|
||||
g_sys.bt_seen = f->bt_seen;
|
||||
g_sys.bt_on = f->bt_on;
|
||||
g_sys.vol = f->vol;
|
||||
g_sys.batt = f->batt;
|
||||
g_sys.charging = f->charging;
|
||||
g_sys.wifi_on = f->wifi_on;
|
||||
g_sys.wifi_connected = f->wifi_connected;
|
||||
g_sys.wifi_level = f->wifi_level;
|
||||
g_sys.bt_seen = f->bt_seen;
|
||||
g_sys.bt_on = f->bt_on;
|
||||
g_sys.vol = f->vol;
|
||||
if (f->brightness <= 0) g_sys.brightness = 0; /* 未知/屏关:不入顶条(>0 才显示) */
|
||||
else if (f->brightness > 100) g_sys.brightness = 100;
|
||||
else g_sys.brightness = f->brightness;
|
||||
g_statusbar_force = 1; /* 数据已变 → 顶条必重画 */
|
||||
}
|
||||
|
||||
/* ---- 系统 UI 模式(「同一个状态栏」闭环;launcher 调用)----
|
||||
* launcher(系统进程)链 meow_ui.a 后调 meow_ui_sys_set_system_mode(1):本进程渲染全局状态栏
|
||||
* (present() 前置合成 + App 前台叠加)。App 进程默认 0:不渲染状态栏、只 inset(§6.1 ③ /
|
||||
* FRAMEWORK_DESIGN §10.2)。meow_ui_sys_statusbar_active()/meow_ui_statusbar_height() 不随此
|
||||
* 开关变(App 仍报告 28px inset + 顶部热区),仅渲染路径受控。 */
|
||||
void meow_ui_sys_set_system_mode(int on)
|
||||
{
|
||||
g_sys_render = on ? 1 : 0;
|
||||
g_statusbar_force = 1; /* 切换即强制下次 present 反映(画/不画顶条) */
|
||||
}
|
||||
|
||||
int meow_ui_sys_render_enabled(void)
|
||||
{
|
||||
return g_sys_render;
|
||||
}
|
||||
|
||||
/* ---- 公共 API ---- */
|
||||
void meow_ui_set_statusbar(int visible)
|
||||
{
|
||||
@@ -225,35 +249,50 @@ int meow_ui_sys_statusbar_force(void)
|
||||
return f;
|
||||
}
|
||||
|
||||
/* 状态栏右侧信息串:batt% WIFI 蓝牙 VOL nn% 亮度nn%(同 launcher 状态栏右侧语义,文本式)。
|
||||
* mfont 就绪用 CJK「蓝牙/亮度」,否则回退 ASCII "BT/BRI"(28px 栏紧凑,避免超宽叠到时钟)。
|
||||
* 顺序与 launcher 右侧簇一致:电量 → WiFi → 蓝牙 → 音量 → 亮度。*/
|
||||
static void statusbar_right_str(char *out, size_t n)
|
||||
/* ---- 右侧信息簇(MD3 图标 + 变量值,取代文本式 statusbar_right_str)----
|
||||
* 「同一个状态栏」右侧 = 图标+值:电量图标+% / 音量图标+% / 蓝牙图标 / WiFi 图标(信号分档)/
|
||||
* 亮度图标+%(可选,与时钟不重叠才画)。图标位图来自 sb_icons.h(复用 launcher);
|
||||
* 文字=紧凑数值(%d%%),无 CJK 依赖;颜色随 meow_theme(日/夜)由主题表提供。
|
||||
* 顺序(右→左):电量(最右)→ 音量 → 蓝牙 → WiFi → 亮度。 */
|
||||
/* 注:旧文本式右侧串 statusbar_right_str 已退役为图标簇(同上),不再保留调用路径。 */
|
||||
|
||||
/* 画一个右对齐项:右边界=*xr,画完向左推进 *xr(含 MEOW_SB_XGAP 项间隙)。
|
||||
* icon>=0 画图标(可配右侧数值 txt;txt==NULL 仅图标)。文字/图标同用主题色 col。
|
||||
* ink_h 传给 meow_gfx_blit_icon(主图标用 MEOW_SB_ICON_INK 等大;WiFi 强弱档传 0 保持自然 ink)。
|
||||
* 返回该项左边缘(供亮度可选判宽)。 */
|
||||
static int sb_r_place(int *xr, int icon, const char *txt, uint32_t col, int ink_h, int ty)
|
||||
{
|
||||
char batt[16] = "", wifi[16] = "", vol[20] = "", bt[16] = "", bri[20] = "";
|
||||
if (g_sys.batt >= 0) snprintf(batt, sizeof batt, "%d%%", g_sys.batt);
|
||||
if (g_sys.wifi_on) snprintf(wifi, sizeof wifi, "WIFI");
|
||||
snprintf(vol, sizeof vol, "VOL %d%%", g_sys.vol);
|
||||
if (g_sys.bt_seen && g_sys.bt_on)
|
||||
snprintf(bt, sizeof bt, meow_gfx_mfont_ready() ? "蓝牙" : "BT");
|
||||
if (g_sys.brightness > 0) /* >0 才显示(屏常亮态);0=屏关/未知不入 */
|
||||
snprintf(bri, sizeof bri, meow_gfx_mfont_ready() ? "亮度%d%%" : "BRI %d%%", g_sys.brightness);
|
||||
out[0] = 0;
|
||||
if (batt[0]) strcat(out, batt);
|
||||
if (wifi[0]) { if (out[0]) strcat(out, " "); strcat(out, wifi); }
|
||||
if (bt[0]) { if (out[0]) strcat(out, " "); strcat(out, bt); }
|
||||
if (vol[0]) { if (out[0]) strcat(out, " "); strcat(out, vol); }
|
||||
if (bri[0]) { if (out[0]) strcat(out, " "); strcat(out, bri); }
|
||||
int iconw = (icon >= 0) ? MEOW_SB_ICON_SIZE : 0;
|
||||
int gap = (icon >= 0 && txt) ? MEOW_SB_TGAP : 0;
|
||||
int tw = txt ? meow_ui_text_width(txt, MUI_SBAR_FONT) : 0;
|
||||
int x = *xr - (iconw + gap + tw);
|
||||
if (icon >= 0) { meow_gfx_blit_icon(icon, x, 0, ink_h, col, MEOW_SB_ICON_CY); x += iconw + gap; }
|
||||
if (txt) meow_ui_text_right(*xr, ty, txt, MUI_SBAR_FONT, col);
|
||||
*xr -= (iconw + gap + tw) + MEOW_SB_XGAP;
|
||||
return *xr + MEOW_SB_XGAP;
|
||||
}
|
||||
|
||||
/* WiFi 信号分档(g_sys.wifi_connected + wifi_level)→ 图标索引。
|
||||
* 网卡关 → -1(不画);开未关联 → SB_I_WIFI_NO;已关联 → 按 dBm 分 STRONG/MEDIUM/WEAK(未知→满格)。 */
|
||||
static int sb_wifi_icon(void)
|
||||
{
|
||||
if (!g_sys.wifi_on) return MEOW_SB_ICON_WIFI_OFF;
|
||||
if (!g_sys.wifi_connected) return MEOW_SB_ICON_WIFI_NO;
|
||||
if (g_sys.wifi_level <= -1000) return MEOW_SB_ICON_WIFI_STRONG; /* 未知 → 满格 */
|
||||
if (g_sys.wifi_level >= -60) return MEOW_SB_ICON_WIFI_STRONG;
|
||||
if (g_sys.wifi_level >= -75) return MEOW_SB_ICON_WIFI_MEDIUM;
|
||||
return MEOW_SB_ICON_WIFI_WEAK;
|
||||
}
|
||||
|
||||
void meow_ui_sys_statusbar_render(void)
|
||||
{
|
||||
if (!g_sys_render) return; /* 仅系统进程(launcher)渲染;App 不画顶条 */
|
||||
if (!meow_ui_sys_statusbar_active()) return;
|
||||
const meow_theme *th = meow_theme_get();
|
||||
int w = meow_ui_width();
|
||||
int h = MUI_SBAR_H;
|
||||
|
||||
/* 整条清底:覆盖 app 可能画进顶行的内容(z 最顶) */
|
||||
/* 整条清底:覆盖 app 可能画进顶行的内容(z 最顶)。仅系统进程(launcher)渲染本函数。 */
|
||||
meow_ui_fill_rect(0, 0, w, h, th->bg);
|
||||
|
||||
/* 文字垂直锚 y:(栏高-行高)/2 居中;下限 1 防极端行高 > 栏高时负 y 溢出顶端(不越界优先)。 */
|
||||
@@ -268,11 +307,32 @@ void meow_ui_sys_statusbar_render(void)
|
||||
snprintf(timebuf, sizeof timebuf, "%02d:%02d:%02d", tm.tm_hour, tm.tm_min, tm.tm_sec);
|
||||
meow_ui_text(8, ty, timebuf, MUI_SBAR_FONT, th->fg);
|
||||
|
||||
/* 右侧信息串:batt% WIFI 蓝牙 VOL nn% */
|
||||
char right[96];
|
||||
statusbar_right_str(right, sizeof right);
|
||||
if (right[0])
|
||||
meow_ui_text_right(w - 8, ty, right, MUI_SBAR_FONT, th->fg);
|
||||
/* 右侧 MD3 图标簇(从右端 w-8 往左)。主项色 th->fg;次级(蓝牙/弱信号)用 on_surface_variant。
|
||||
* 亮度「可选」:仅在右簇左缘与时钟右缘相距足够(MEOW_SB_CLK_MARGIN)时画,避免与时钟叠字。 */
|
||||
uint32_t col = th->fg, col2 = th->dim; /* col=主色;col2=次要色(蓝牙/分隔用 on_surface_variant=dim 近似) */
|
||||
int xr = w - 8;
|
||||
char val[16];
|
||||
if (g_sys.batt >= 0) { /* 电量:图标+%(未知不画)——最右项 */
|
||||
snprintf(val, sizeof val, "%d%%", g_sys.batt);
|
||||
sb_r_place(&xr, MEOW_SB_ICON_BATT, val, col, MEOW_SB_ICON_INK, ty);
|
||||
}
|
||||
snprintf(val, sizeof val, "%d%%", g_sys.vol);
|
||||
sb_r_place(&xr, MEOW_SB_ICON_VOL, val, col, MEOW_SB_ICON_INK, ty); /* 音量:图标+% */
|
||||
if (g_sys.bt_seen && g_sys.bt_on) { /* 蓝牙:仅图标(上电即显示,连接态占位;多态留后续) */
|
||||
sb_r_place(&xr, MEOW_SB_ICON_BT_CONN, NULL, col2, MEOW_SB_ICON_INK, ty);
|
||||
}
|
||||
if (g_sys.wifi_on) { /* WiFi:仅图标(关不画;开未连/分档) */
|
||||
int wco = sb_wifi_icon();
|
||||
int is_weak = (wco == MEOW_SB_ICON_WIFI_MEDIUM || wco == MEOW_SB_ICON_WIFI_WEAK);
|
||||
sb_r_place(&xr, wco, NULL, col, is_weak ? 0 : MEOW_SB_ICON_INK, ty);
|
||||
}
|
||||
if (g_sys.brightness > 0) { /* 亮度:图标+%(>0 才显示;与时钟不重叠才画) */
|
||||
int bl = (g_sys.brightness > 100) ? 100 : g_sys.brightness;
|
||||
snprintf(val, sizeof val, "%d%%", bl);
|
||||
int bw = MEOW_SB_ICON_SIZE + MEOW_SB_TGAP + meow_ui_text_width(val, MUI_SBAR_FONT) + MEOW_SB_XGAP;
|
||||
if (xr - bw > 8 + meow_ui_text_width(timebuf, MUI_SBAR_FONT) + MEOW_SB_CLK_MARGIN)
|
||||
sb_r_place(&xr, MEOW_SB_ICON_BRIGHT, val, col, MEOW_SB_ICON_INK, ty);
|
||||
}
|
||||
|
||||
/* 分隔线(栏内最底 1px,主题次要色);内容 inset=statusbar_height()=28 从 y=28 起即干净 */
|
||||
meow_ui_fill_rect(0, h - 1, w, 1, th->dim);
|
||||
|
||||
+3
-1
@@ -23,7 +23,9 @@
|
||||
typedef struct meow_sys_state {
|
||||
int batt; /* 电量 %;-1=未知 */
|
||||
int charging; /* 1=充电/满 */
|
||||
int wifi_on; /* operstate==up */
|
||||
int wifi_on; /* 网卡 up(射频开;launcher 喂入按 g_sys.wifi_on) */
|
||||
int wifi_connected;/* 已关联 AP(operstate up);launcher 喂入(g_sys.wifi_connected)。WiFi 分档用 */
|
||||
int wifi_level; /* 信号 dBm(-1000=未知);launcher 喂入(-60 强 / -75 中 / 更弱弱)。 */
|
||||
int bt_seen; /* hci0 节点存在 */
|
||||
int bt_on; /* 实际上电(hciconfig UP) */
|
||||
int vol; /* 音量 0-100 */
|
||||
|
||||
@@ -31,6 +31,7 @@ static meow_theme_mode g_manual = MEOW_THEME_DARK; /* display.theme 解析出的
|
||||
static int g_dark_start = 0; /* 深色时段开始(分钟 0-1439) */
|
||||
static int g_dark_end = 0; /* 深色时段结束(分钟 0-1439) */
|
||||
static int g_loaded = 0;
|
||||
static int g_style = MEOW_STYLE_MD3; /* 顶级主题风格族(§8.1.2):默认 MD3 */
|
||||
|
||||
static meow_theme_listener g_listeners[8];
|
||||
static int g_nlisteners = 0;
|
||||
@@ -107,6 +108,15 @@ static void load_settings(void)
|
||||
|
||||
get_setting_int("display.theme_dark_start", &g_dark_start);
|
||||
get_setting_int("display.theme_dark_end", &g_dark_end);
|
||||
|
||||
/* 顶级主题风格族(§8.1.2 minimal):ui.style 的 md3/miuix。读取缺失/未知 → 回退 MD3。
|
||||
* 决定状态栏右侧图标集(§3.1 同一个状态栏);配色日/夜仍由 display.theme 现有解析管。 */
|
||||
g_style = MEOW_STYLE_MD3;
|
||||
if (get_setting_str("ui.style", buf, sizeof buf) == 0) {
|
||||
const char *v = buf;
|
||||
while (*v == ' ' || *v == '\t') v++;
|
||||
if (!strncmp(v, "miuix", 5) || !strncmp(v, "miui", 4)) g_style = MEOW_STYLE_MIUIX;
|
||||
}
|
||||
}
|
||||
|
||||
/* 当前本地时刻的「当天第几分钟」(tm_hour*60+tm_min);供时段判定用(与 launcher s_now_min_of_day 一致)。 */
|
||||
@@ -186,6 +196,28 @@ meow_theme meow_theme_defaults(meow_theme_mode m)
|
||||
}
|
||||
}
|
||||
|
||||
/* ---- §8.1.2 顶级主题风格族(minimal)----
|
||||
* meow_ui_style() 返回当前 ui.style(读取走 load_settings,随 meow_theme_reload() 重读,
|
||||
* 故 launcher 改 settings.conf 后经 sb_sdk_refresh→theme_reload 即跟手)。
|
||||
* meow_ui_set_style() 记录 style(越界 clamp;同值忽略)并触发 reload/broadcast——供需要
|
||||
* 显式切换的调用方(后续 launcher 设置页切换可改走此路径);状态栏图标集据此换集。 */
|
||||
int meow_ui_style(void)
|
||||
{
|
||||
if (!g_loaded) { load_settings(); g_loaded = 1; }
|
||||
return g_style;
|
||||
}
|
||||
|
||||
void meow_ui_set_style(int style)
|
||||
{
|
||||
if (style < MEOW_STYLE_MD3) style = MEOW_STYLE_MD3;
|
||||
if (style > MEOW_STYLE_MIUIX) style = MEOW_STYLE_MIUIX;
|
||||
if (style == g_style) return;
|
||||
g_style = style;
|
||||
/* 触发下一帧按新 style 重绘:清 settings 缓存(下次 get 重读)不必要(style 已记录),
|
||||
* 仅广播主题 listener(沿用 theme 广播机制,让控件/状态栏下一帧用新 style 重绘)。 */
|
||||
broadcast();
|
||||
}
|
||||
|
||||
void meow_theme_add_listener(meow_theme_listener cb)
|
||||
{
|
||||
if (!cb) return;
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/* render_sb_statusbar.c — 宿主可视化渲染:把「同一个状态栏」画进 back_buf 并 dump PPM 目检。
|
||||
* 仅用于宿主验证(无 /dev/fb0 → 480x720 离屏;字体缺失时图标仍画,数值可能缺字)。
|
||||
* 编译(宿主 gcc):
|
||||
* gcc -o render_sb_statusbar render_sb_statusbar.c meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c \
|
||||
* meow_ui_vol.c meow_ui_log.c /tmp/meow_font_host.o -I. -I../meow_launcherd -lz
|
||||
*/
|
||||
#include "meow_ui.h"
|
||||
#include "meow_ui_internal.h"
|
||||
#include "meow_ui_sys.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
(void)argc;
|
||||
meow_ui_opts o = { 480, 720 };
|
||||
if (meow_ui_init(&o) != 0) { printf("init failed\n"); return 1; }
|
||||
meow_ui_sys_set_system_mode(1);
|
||||
meow_ui_set_statusbar(1);
|
||||
|
||||
/* 喂权威快照(模拟 launcher):电量81/充电/音量60/蓝牙连/WiFi已连-50(强)/亮度100 */
|
||||
meow_ui_feed f;
|
||||
memset(&f, 0, sizeof f);
|
||||
f.batt = 81; f.charging = 1; f.wifi_on = 1; f.wifi_connected = 1; f.wifi_level = -50;
|
||||
f.bt_seen = 1; f.bt_on = 1; f.vol = 60; f.brightness = 100;
|
||||
meow_ui_sys_feed(&f);
|
||||
|
||||
/* 清整屏(背景)→ 画状态栏 → 把 top 28 行 + 一点内容区 dump 成 PPM */
|
||||
meow_ui_clear(0x141824);
|
||||
meow_ui_sys_statusbar_render();
|
||||
|
||||
const char *path = argv[1] ? argv[1] : "/tmp/sb_statusbar.ppm";
|
||||
FILE *fp = fopen(path, "wb");
|
||||
if (!fp) { printf("cannot open %s\n", path); return 1; }
|
||||
int w = 480, h = 480; /* 宽 x 全屏高,看顶条+背景 */
|
||||
fprintf(fp, "P6\n%d %d\n255\n", w, h);
|
||||
unsigned char *bb = meow_ui_back_buf();
|
||||
for (int ry = 0; ry < h; ry++) {
|
||||
for (int cx = 0; cx < w; cx++) {
|
||||
uint16_t p = *(uint16_t *)(bb + (size_t)ry * (size_t)(w * 2) + (size_t)cx * 2);
|
||||
int r = ((p >> 11) & 0x1F) << 3;
|
||||
int g = ((p >> 5) & 0x3F) << 2;
|
||||
int b = (p & 0x1F) << 3;
|
||||
fputc(r, fp); fputc(g, fp); fputc(b, fp);
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
printf("wrote %s (%dx%d)\n", path, w, h);
|
||||
return 0;
|
||||
}
|
||||
+216
@@ -0,0 +1,216 @@
|
||||
/* sb_icons.h — 状态栏/通知中心图标(Material Symbols Rounded, MD3),单通道 alpha 位图 32x32。
|
||||
* 生成自 material-symbols@0.47.0 rounded 字体光栅化;每像素 0..255(亮度/alpha)。
|
||||
* ★ 为日/夜间预留:位图只存亮度;绘制颜色由调用方主题表提供,换主题仅改配色。 */
|
||||
#ifndef SB_ICONS_H
|
||||
#define SB_ICONS_H
|
||||
|
||||
#define SB_ICON_SIZE 32
|
||||
|
||||
typedef struct { const unsigned char *data; } sb_icon_t;
|
||||
|
||||
static const unsigned char SB_ICON_WIFI[1024]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,3,3,2,2,3,3,4,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,1,0,0,0,0,0,0,0,0,0,0,0,0,1,4,1,0,0,0,0,0,0,0,0,0,0,0,0,1,3,0,0,0,30,77,122,154,177,187,187,177,154,122,77,30,0,0,0,3,1,0,0,0,0,0,0,0,0,0,3,0,0,25,108,191,244,255,255,255,255,255,255,255,255,255,255,244,191,108,25,0,0,3,0,0,0,0,0,0,1,1,0,27,140,235,255,255,255,249,248,251,254,255,255,254,251,248,249,255,255,255,235,140,27,0,1,1,0,0,0,2,0,0,110,235,255,255,249,251,255,255,255,255,246,240,240,246,255,255,255,255,251,249,255,255,235,110,0,0,2,0,1,0,25,181,255,255,249,253,255,255,216,151,92,53,29,18,18,29,53,92,151,217,255,255,253,249,255,255,181,25,0,1,
|
||||
1,30,220,255,250,251,255,255,180,74,6,0,0,0,0,0,0,0,0,0,0,6,75,180,255,255,251,250,255,220,30,1,0,124,255,244,252,255,207,69,0,0,0,6,7,4,0,0,0,0,4,7,6,0,0,0,69,207,255,252,244,255,123,0,0,76,255,255,255,147,8,0,3,6,0,0,0,0,7,15,15,7,0,0,0,0,6,3,0,8,147,255,255,255,76,0,1,0,93,151,80,0,0,5,1,0,2,67,140,193,221,235,235,221,192,138,64,0,0,1,5,0,0,80,151,93,0,1,0,0,0,0,0,2,2,0,0,97,207,255,255,255,255,255,255,255,255,255,255,204,93,0,0,2,2,0,0,0,0,0,0,0,3,4,3,2,0,37,191,255,255,251,248,255,255,255,255,255,254,248,251,255,255,187,35,0,2,3,4,3,0,0,0,0,0,0,1,1,7,212,255,248,251,255,255,246,213,193,193,214,247,255,255,250,248,255,211,7,1,1,0,0,0,0,0,0,0,0,1,0,10,235,255,255,255,197,98,31,3,0,0,3,33,100,200,255,255,255,234,10,0,1,0,0,0,0,
|
||||
0,0,0,0,0,2,0,85,216,206,95,0,0,0,1,6,6,1,0,0,0,99,208,215,81,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,3,0,0,0,0,3,3,0,0,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,3,0,1,0,48,119,107,25,0,1,0,3,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,2,0,95,251,255,255,230,48,0,2,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,21,241,255,249,248,255,190,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,63,255,252,255,254,253,235,14,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,46,255,251,253,251,252,225,7,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,185,255,255,255,255,124,0,3,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,1,0,20,163,231,223,128,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const unsigned char SB_ICON_BT[1024]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,153,156,6,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,3,0,61,255,255,183,8,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,3,0,66,252,247,255,186,10,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,2,3,0,65,255,253,255,255,188,11,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,44,221,195,23,0,6,0,65,255,251,227,255,255,191,13,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,85,255,255,208,23,0,1,65,255,254,69,167,255,255,193,16,2,1,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,2,5,159,255,255,209,25,0,69,255,255,63,0,175,252,255,165,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,160,255,255,212,17,55,255,255,57,16,197,251,255,150,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,159,255,255,198,88,254,254,88,198,255,255,171,6,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,158,255,255,244,254,254,244,255,255,167,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,158,255,255,255,255,255,255,164,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,153,251,253,253,251,156,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,18,235,254,254,236,19,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,21,204,254,253,253,253,204,20,0,3,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,3,0,20,204,255,255,255,255,255,255,203,19,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,21,205,255,255,214,254,254,214,255,255,203,19,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,21,206,255,255,151,60,255,255,60,151,255,255,203,21,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,22,206,255,255,167,0,63,255,255,66,0,169,253,255,170,0,3,0,0,0,0,0,0,0,0,0,0,0,0,1,1,21,203,255,255,163,1,1,67,255,255,54,25,206,251,255,148,0,3,0,0,0,0,0,0,0,0,0,0,0,0,4,0,92,255,255,162,0,4,0,65,255,253,101,211,255,255,176,6,2,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,22,169,140,0,1,5,0,65,255,252,252,255,255,178,5,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,0,65,255,253,251,255,180,5,1,2,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,1,3,3,1,0,3,0,66,252,247,255,182,6,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,60,255,255,183,7,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,8,151,157,7,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const unsigned char SB_ICON_BATT[1024]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,16,16,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,4,75,235,237,237,235,75,4,7,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,124,255,255,255,255,124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,80,123,115,184,253,251,251,253,184,116,123,98,8,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,49,255,255,255,255,255,255,255,255,255,255,255,255,107,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,68,253,249,239,236,239,238,238,239,236,236,246,252,131,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,64,255,255,77,16,19,17,17,17,16,32,235,255,125,0,4,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,3,0,65,255,255,62,0,0,0,0,0,0,13,234,255,126,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,255,66,1,4,1,1,2,1,18,234,255,126,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,255,67,2,5,2,2,3,2,19,234,255,126,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,255,56,0,0,0,0,0,0,6,233,255,126,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,254,206,190,190,190,190,190,190,194,247,255,127,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,253,255,255,255,255,255,255,255,255,252,255,128,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,253,253,252,252,252,252,252,252,252,251,255,128,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,253,255,255,255,255,255,255,255,255,251,255,128,0,4,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,3,0,65,255,253,255,255,255,255,255,255,255,255,251,255,128,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,253,255,255,255,255,255,255,255,255,251,255,128,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,253,255,255,255,255,255,255,255,255,251,255,128,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,253,255,255,255,255,255,255,255,255,251,255,128,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,253,255,255,255,255,255,255,255,255,251,255,128,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,253,255,255,255,255,255,255,255,255,251,255,128,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,253,255,255,255,255,255,255,255,255,251,255,128,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,65,255,253,255,255,255,255,255,255,255,255,251,255,128,0,4,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,3,0,64,255,253,255,255,255,255,255,255,255,255,251,255,127,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,67,253,249,251,251,251,251,251,251,251,251,247,251,131,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,51,255,255,255,255,255,255,255,255,255,255,255,255,111,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,88,128,126,128,128,128,128,128,128,127,127,110,11,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,4,4,4,4,4,4,4,4,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const unsigned char SB_ICON_VOL[1024]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,2,1,1,20,193,209,94,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,0,48,255,255,255,178,21,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,53,198,127,1,3,2,104,229,255,255,211,24,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,58,239,255,245,15,0,2,0,23,172,255,255,199,7,3,1,0,0,0,0,0,0,0,0,0,3,3,3,3,5,0,57,239,255,252,236,17,0,0,3,0,0,161,255,255,131,0,3,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,58,239,255,255,255,238,17,0,4,3,0,3,5,206,254,245,32,0,2,0,0,0,0,0,0,0,0,51,66,65,66,88,238,255,255,227,255,238,20,0,110,209,24,3,0,64,253,255,130,0,4,0,0,0,0,0,3,0,87,255,255,255,255,255,255,255,111,117,255,234,21,0,130,255,187,2,2,0,198,254,205,2,1,0,0,0,0,0,4,0,133,255,249,255,255,255,254,122,0,127,255,234,21,0,128,253,255,78,0,0,125,255,242,28,0,2,0,0,0,0,4,0,125,255,238,72,58,62,49,0,2,127,255,234,21,0,129,255,254,159,0,0,83,255,255,55,0,3,0,0,0,0,4,0,126,255,233,2,0,0,0,9,0,126,255,234,21,0,129,255,255,187,0,0,67,255,255,64,0,3,0,0,0,0,4,0,125,255,235,31,15,17,9,0,2,126,255,234,21,0,129,255,254,173,0,0,76,255,255,59,0,3,0,0,0,0,4,0,131,251,245,228,226,227,220,71,0,131,255,234,21,0,129,254,255,108,0,1,112,255,247,36,0,2,0,0,
|
||||
0,0,4,0,111,255,255,255,255,255,255,249,61,111,255,234,21,0,127,255,225,17,1,0,178,255,217,6,0,1,0,0,0,0,1,0,11,110,127,126,126,148,255,255,240,197,255,237,21,0,127,249,61,0,2,37,245,255,153,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,106,255,255,255,255,238,18,0,25,41,0,6,0,173,255,254,54,0,3,0,0,0,0,0,0,0,1,4,4,4,4,5,0,106,255,250,254,236,17,0,0,0,5,0,112,255,255,169,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,106,255,255,245,17,0,3,0,0,117,254,255,232,26,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,102,243,176,3,3,0,53,184,255,255,244,60,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,26,4,1,1,38,251,255,255,224,60,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,35,238,246,153,23,0,3,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,1,0,31,39,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const unsigned char SB_ICON_BRIGHT[1024]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,14,64,64,32,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,4,6,0,36,212,255,255,240,77,0,5,4,4,4,3,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,47,226,255,255,254,255,251,91,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,67,125,126,127,131,234,255,255,118,73,248,255,253,147,126,126,126,89,2,0,1,0,0,0,0,0,0,0,0,3,0,106,255,255,255,255,255,255,255,119,0,0,71,243,255,255,255,255,255,255,162,2,2,0,0,0,0,0,0,0,1,0,7,227,254,237,226,227,225,228,111,0,8,9,0,64,218,227,226,226,232,252,255,46,0,2,0,0,0,0,0,0,1,0,17,234,255,132,12,16,13,14,0,0,0,0,0,0,9,14,15,12,74,255,254,67,0,3,0,0,0,
|
||||
0,0,0,1,0,18,234,255,124,0,1,0,0,15,77,119,124,89,31,0,0,1,0,63,255,255,66,0,3,0,0,0,0,0,0,1,1,14,233,255,126,1,7,0,98,224,255,255,255,255,240,135,5,4,1,65,255,255,61,2,3,0,0,0,0,0,0,3,0,30,241,253,130,0,0,125,255,255,252,251,251,252,255,255,177,6,1,69,254,255,85,0,5,0,0,0,0,0,2,0,21,204,253,255,116,0,78,255,251,253,255,255,255,255,254,249,255,137,0,57,255,253,234,58,0,3,0,0,0,1,0,23,206,255,255,169,10,3,203,254,252,255,255,255,255,255,255,254,252,246,29,0,118,255,255,240,59,0,2,0,0,2,5,194,255,255,173,2,0,37,251,255,254,255,255,255,255,255,255,255,252,255,92,0,0,119,255,255,238,31,1,1,3,0,57,255,253,176,0,6,1,63,255,253,255,255,255,255,255,255,255,255,251,254,124,0,9,0,120,253,255,119,0,5,2,0,45,255,253,204,28,0,1,59,255,254,255,255,255,255,255,255,255,255,251,254,120,1,5,5,162,253,255,102,0,4,
|
||||
0,2,0,151,255,255,216,27,0,27,245,254,254,255,255,255,255,255,255,255,252,255,78,0,3,171,255,255,204,13,1,1,0,1,2,1,160,255,255,213,33,0,179,255,251,255,255,255,255,255,255,253,253,231,16,10,169,255,255,206,22,0,1,0,0,0,1,2,0,158,252,255,131,0,47,246,255,251,254,255,255,254,252,251,255,96,0,67,255,252,202,21,0,2,0,0,0,0,0,2,0,12,236,253,126,0,0,76,244,255,255,253,253,255,255,255,126,0,1,66,253,255,64,0,5,0,0,0,0,0,0,1,1,18,233,255,128,4,11,0,50,175,241,255,255,248,198,81,0,9,4,68,255,255,65,1,3,0,0,0,0,0,0,1,0,18,233,255,117,0,0,0,0,0,28,59,63,37,0,0,0,0,0,51,255,254,65,0,3,0,0,0,0,0,0,1,0,15,237,252,184,116,119,117,118,24,0,0,0,0,0,107,119,118,116,152,253,255,65,0,3,0,0,0,0,0,0,0,2,2,192,255,255,255,255,255,255,208,26,0,6,3,163,255,255,255,255,255,255,241,24,0,1,0,0,0,
|
||||
0,0,0,0,2,0,34,187,234,234,234,237,255,255,212,24,0,169,255,255,243,234,234,234,209,70,0,2,0,0,0,0,0,0,0,0,0,0,0,0,16,17,18,20,159,255,255,207,175,255,255,205,35,18,17,17,1,0,1,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,159,255,255,255,255,206,21,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,0,151,252,255,190,22,0,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,45,56,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const unsigned char SB_ICON_WIFI_STRONG[1024]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,2,3,4,3,3,2,2,3,3,4,3,2,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,1,4,1,0,0,0,0,0,0,0,0,0,0,0,0,1,4,1,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,1,3,0,0,0,30,77,122,154,177,187,187,177,154,122,77,30,0,0,0,3,1,0,0,0,0,0,
|
||||
0,0,0,0,3,0,0,25,108,191,244,255,255,255,255,255,255,255,255,255,255,244,191,108,25,0,0,3,0,0,0,0,
|
||||
0,0,1,1,0,27,140,235,255,255,255,249,248,251,254,255,255,254,251,248,249,255,255,255,235,140,27,0,1,1,0,0,
|
||||
0,2,0,0,110,235,255,255,249,251,255,255,255,255,246,240,240,246,255,255,255,255,251,249,255,255,235,110,0,0,2,0,
|
||||
1,0,25,181,255,255,249,253,255,255,216,151,92,53,29,18,18,29,53,92,151,217,255,255,253,249,255,255,181,25,0,1,
|
||||
1,30,220,255,250,251,255,255,180,74,6,0,0,0,0,0,0,0,0,0,0,6,75,180,255,255,251,250,255,220,30,1,
|
||||
0,124,255,244,252,255,207,69,0,0,0,6,7,4,0,0,0,0,4,7,6,0,0,0,69,207,255,252,244,255,123,0,
|
||||
0,76,255,255,255,147,8,0,3,6,0,0,0,0,7,15,15,7,0,0,0,0,6,3,0,8,147,255,255,255,76,0,
|
||||
1,0,93,151,80,0,0,5,1,0,2,67,140,193,221,235,235,221,192,138,64,0,0,1,5,0,0,80,151,93,0,1,
|
||||
0,0,0,0,0,2,2,0,0,97,207,255,255,255,255,255,255,255,255,255,255,204,93,0,0,2,2,0,0,0,0,0,
|
||||
0,0,3,4,3,2,0,37,191,255,255,251,248,255,255,255,255,255,254,248,251,255,255,187,35,0,2,3,4,3,0,0,
|
||||
0,0,0,0,1,1,7,212,255,248,251,255,255,246,213,193,193,214,247,255,255,250,248,255,211,7,1,1,0,0,0,0,
|
||||
0,0,0,0,1,0,10,235,255,255,255,197,98,31,3,0,0,3,33,100,200,255,255,255,234,10,0,1,0,0,0,0,
|
||||
0,0,0,0,0,2,0,85,216,206,95,0,0,0,1,6,6,1,0,0,0,99,208,215,81,0,2,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,4,0,0,0,4,3,0,0,0,0,3,3,0,0,1,3,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,2,0,0,3,0,1,0,48,119,107,25,0,1,0,3,0,0,2,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,1,1,0,2,0,95,251,255,255,230,48,0,2,0,1,1,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,1,0,21,241,255,249,248,255,190,1,2,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,3,0,63,255,252,255,254,253,235,14,0,1,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,2,0,46,255,251,253,251,252,225,7,0,1,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,2,2,185,255,255,255,255,124,0,3,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,1,0,20,163,231,223,128,2,1,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const unsigned char SB_ICON_WIFI_MEDIUM[1024]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,1,3,4,2,2,2,2,2,2,4,3,1,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,2,0,0,3,68,141,187,189,189,189,189,186,139,65,1,0,1,2,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,1,0,1,99,209,255,255,255,255,255,255,255,255,255,255,205,95,0,0,1,0,0,0,0,0,0,
|
||||
0,0,0,0,0,2,0,39,194,255,255,251,248,255,255,255,255,255,254,248,251,255,255,190,37,0,2,0,0,0,0,0,
|
||||
0,0,0,0,1,1,7,215,255,248,251,255,255,246,213,193,193,213,247,255,255,251,248,255,213,7,1,1,0,0,0,0,
|
||||
0,0,0,0,1,0,10,233,255,255,255,194,96,31,3,0,0,3,32,99,197,255,255,255,232,9,0,1,0,0,0,0,
|
||||
0,0,0,0,0,2,0,80,210,199,89,0,0,0,1,6,6,1,0,0,0,93,202,209,76,0,2,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,1,3,3,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,2,0,0,3,0,1,0,25,107,119,47,0,1,0,3,0,0,2,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,1,0,0,2,0,48,230,255,255,251,94,0,2,0,0,1,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,2,1,191,255,248,249,255,241,20,0,1,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,1,0,14,236,253,254,255,252,255,63,0,3,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,1,0,7,226,252,251,253,251,255,46,0,2,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,3,0,124,255,255,255,255,184,2,2,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,1,2,128,223,231,162,19,0,1,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const unsigned char SB_ICON_WIFI_WEAK[1024]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,1,0,4,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,2,0,52,213,237,238,184,19,1,1,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,1,1,10,219,255,255,255,255,160,0,3,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,3,0,57,255,252,254,252,252,232,11,0,1,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,3,0,57,255,252,255,253,252,232,11,0,1,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,1,1,10,219,255,251,251,255,160,0,3,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,2,0,52,215,255,255,185,20,1,1,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,1,0,9,59,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
/* 网络状态位图(M2.48):WiFi 开未连接/关闭、蓝牙 未连接/已连接/关闭/搜索中 */
|
||||
static const unsigned char SB_ICON_WIFI_NO[1024]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,3,3,2,2,3,3,4,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,1,0,0,0,0,0,0,0,0,0,0,0,0,1,4,1,0,0,0,0,0,0,0,0,0,0,0,0,1,3,0,0,0,30,77,122,154,177,187,187,177,154,122,77,30,0,0,0,3,1,0,0,0,0,0,0,0,0,0,3,0,0,25,108,191,244,255,255,255,255,255,255,255,255,255,255,244,191,108,25,0,0,3,0,0,0,0,0,0,1,1,0,27,140,235,255,255,255,249,248,251,254,255,255,254,251,248,249,255,255,255,235,140,27,0,1,1,0,0,0,2,0,0,110,235,255,255,249,251,255,255,255,255,246,240,240,246,255,255,255,255,251,249,255,255,235,110,0,0,2,0,1,0,25,181,255,255,249,253,255,255,216,151,92,53,29,18,18,29,53,92,151,217,255,255,253,249,255,255,181,25,0,1,
|
||||
1,30,220,255,250,251,255,255,180,74,6,0,0,0,0,0,0,0,0,0,0,6,75,180,255,255,251,250,255,220,30,1,0,124,255,244,252,255,207,69,0,0,0,6,7,4,0,0,0,0,4,7,6,0,0,0,69,207,255,252,244,255,123,0,0,76,255,255,255,147,8,0,3,6,0,0,0,0,7,15,15,7,0,0,0,0,6,3,0,8,147,255,255,255,76,0,1,0,93,151,80,0,0,5,1,0,2,67,140,193,221,235,235,221,192,138,64,0,0,1,5,0,0,80,151,93,0,1,0,0,0,0,0,2,2,0,0,97,207,255,255,255,255,255,255,255,255,255,255,204,93,0,0,2,2,0,0,0,0,0,0,0,3,4,3,2,0,37,191,255,255,251,248,255,255,255,255,255,254,248,251,255,255,187,35,0,2,3,4,3,0,0,0,0,0,0,1,1,7,212,255,248,251,255,255,246,213,193,193,214,247,255,255,250,248,255,211,7,1,1,0,0,0,0,0,0,0,0,1,0,10,235,255,255,255,197,98,31,3,0,0,3,33,100,200,255,255,255,234,10,0,1,0,0,0,0,
|
||||
0,0,0,0,0,2,0,85,216,206,95,0,0,0,1,6,6,1,0,0,0,99,208,215,81,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,3,0,0,0,0,3,3,0,0,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,3,0,1,0,48,119,107,25,0,1,0,3,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,2,0,95,251,255,255,230,48,0,2,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,21,241,255,249,248,255,190,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,63,255,252,255,254,253,235,14,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,46,255,251,253,251,252,225,7,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,185,255,255,255,255,124,0,3,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,1,0,20,163,231,223,128,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const unsigned char SB_ICON_WIFI_OFF[1024]={
|
||||
0,0,0,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,1,3,3,3,3,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,22,55,0,1,1,0,0,0,2,0,0,0,0,0,0,0,0,1,4,3,1,0,0,0,0,0,0,0,0,1,1,6,208,255,135,0,3,1,0,1,0,14,54,65,65,64,56,39,16,0,0,0,0,3,2,0,0,0,0,0,0,1,1,6,207,255,255,137,0,4,3,1,54,225,255,255,255,255,255,251,235,201,147,77,13,0,0,3,1,0,0,0,0,0,2,0,34,212,252,255,136,0,6,0,171,255,247,249,248,248,250,253,255,255,255,255,224,135,35,0,0,3,0,0,0,0,0,5,0,56,247,251,255,135,0,1,134,255,255,255,255,255,255,255,255,255,248,250,255,255,242,141,20,0,3,0,0,0,1,0,92,226,253,253,248,255,135,0,13,139,177,147,132,129,142,170,205,245,255,255,254,248,255,255,225,84,0,0,0,
|
||||
2,5,143,255,255,253,254,255,255,255,133,0,0,0,0,0,0,0,0,0,30,91,179,252,255,253,249,255,255,140,4,2,0,98,255,249,250,255,255,175,217,255,255,132,0,7,4,4,4,4,4,3,0,0,0,48,164,255,255,250,250,255,96,0,0,109,255,255,255,225,85,0,37,228,255,255,130,0,4,1,0,0,0,0,0,7,3,0,0,70,217,255,254,255,113,0,1,14,176,234,168,26,0,6,0,34,212,252,255,128,0,4,2,0,34,53,3,0,0,5,4,0,18,160,233,185,18,1,0,0,0,15,0,0,4,0,0,21,163,254,249,255,127,0,7,0,143,255,211,127,23,0,1,3,0,0,14,0,0,0,0,1,1,0,2,2,0,6,121,239,255,254,252,247,255,126,0,4,17,190,255,255,231,104,0,1,2,2,0,1,1,0,0,0,0,1,1,2,7,181,255,255,250,254,255,255,255,255,125,0,0,12,190,255,254,255,155,3,2,0,1,0,0,0,0,0,0,0,2,0,33,255,249,251,255,255,196,131,229,255,255,123,0,2,13,193,255,254,255,32,0,2,0,0,0,0,
|
||||
0,0,0,0,1,2,5,183,255,255,191,63,0,0,48,234,255,255,122,0,1,14,183,249,173,8,2,1,0,0,0,0,0,0,0,0,0,1,0,10,89,72,0,0,1,7,0,46,232,255,255,121,0,1,0,35,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,6,56,221,255,255,119,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,3,0,1,0,19,162,234,211,177,234,255,255,118,0,6,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,184,255,255,255,255,173,228,255,255,117,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,46,255,251,253,251,255,209,57,236,255,255,116,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,63,255,252,255,254,253,241,0,54,240,255,255,115,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,20,240,255,249,248,255,188,4,0,59,240,255,255,114,0,2,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,2,0,92,250,255,255,228,46,0,6,0,61,241,255,255,109,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,47,119,107,24,0,1,0,4,0,63,242,255,255,31,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,2,0,0,0,4,0,63,224,185,13,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,1,0,0,0,0,0,2,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const unsigned char SB_ICON_BT_NO[1024]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,153,156,6,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,3,0,61,255,255,183,8,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,3,0,66,252,247,255,186,10,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,2,3,0,65,255,253,255,255,188,11,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,44,221,195,23,0,6,0,65,255,251,227,255,255,191,13,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,85,255,255,208,23,0,1,65,255,254,69,167,255,255,193,16,2,1,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,2,5,159,255,255,209,25,0,69,255,255,63,0,175,252,255,165,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,160,255,255,212,17,55,255,255,57,16,197,251,255,150,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,159,255,255,198,88,254,254,88,198,255,255,171,6,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,158,255,255,244,254,254,244,255,255,167,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,158,255,255,255,255,255,255,164,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,153,251,253,253,251,156,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,18,235,254,254,236,19,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,21,204,254,253,253,253,204,20,0,3,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,3,0,20,204,255,255,255,255,255,255,203,19,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,21,205,255,255,214,254,254,214,255,255,203,19,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,21,206,255,255,151,60,255,255,60,151,255,255,203,21,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,22,206,255,255,167,0,63,255,255,66,0,169,253,255,170,0,3,0,0,0,0,0,0,0,0,0,0,0,0,1,1,21,203,255,255,163,1,1,67,255,255,54,25,206,251,255,148,0,3,0,0,0,0,0,0,0,0,0,0,0,0,4,0,92,255,255,162,0,4,0,65,255,253,101,211,255,255,176,6,2,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,22,169,140,0,1,5,0,65,255,252,252,255,255,178,5,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,0,65,255,253,251,255,180,5,1,2,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,1,3,3,1,0,3,0,66,252,247,255,182,6,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,60,255,255,183,7,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,8,151,157,7,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const unsigned char SB_ICON_BT_CONN[1024]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,8,153,155,6,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,3,0,61,255,255,181,7,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,3,0,66,252,247,255,183,8,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,1,0,2,3,0,65,255,253,255,255,185,9,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,40,219,199,25,0,6,0,65,255,251,228,255,255,187,10,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,77,255,255,210,24,0,1,65,255,254,69,170,255,255,188,13,2,1,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,2,4,153,255,255,209,25,0,69,255,255,63,0,179,252,255,156,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,155,255,255,211,15,55,255,255,57,14,197,252,255,141,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,4,0,155,255,255,195,84,254,254,84,195,255,255,165,4,3,5,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,155,255,255,241,254,254,241,255,255,163,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,96,113,15,0,4,0,155,255,255,255,255,255,255,161,0,3,1,15,113,95,2,1,0,0,0,0,0,0,0,3,0,125,255,255,183,3,3,3,0,152,251,253,253,251,154,1,2,3,3,183,255,255,125,0,3,0,0,0,0,0,0,3,0,195,254,250,247,13,0,5,0,18,235,254,254,235,18,0,5,0,13,247,250,254,195,0,3,0,0,0,0,0,0,3,0,88,250,255,140,0,5,0,20,203,253,253,253,253,202,19,0,5,0,140,255,249,87,0,3,0,0,0,
|
||||
0,0,0,0,1,0,41,54,0,2,0,19,202,255,255,255,255,255,255,200,17,0,2,0,54,41,0,1,0,0,0,0,0,0,0,0,0,1,0,0,3,0,19,203,255,255,210,254,254,210,255,255,199,16,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,2,5,0,19,202,255,255,147,58,255,255,58,148,255,255,198,18,2,4,2,0,0,0,0,0,0,0,0,0,0,0,0,1,0,19,202,255,255,165,0,64,255,255,67,0,170,253,255,161,0,4,0,0,0,0,0,0,0,0,0,0,0,0,1,2,19,198,255,255,164,1,1,67,255,255,53,28,209,251,255,140,0,3,0,0,0,0,0,0,0,0,0,0,0,0,3,0,83,255,255,165,1,4,0,65,255,253,102,213,255,255,169,5,2,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,19,166,143,1,1,5,0,65,255,252,252,255,255,172,2,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,0,65,255,253,251,255,175,3,1,2,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,1,3,3,1,0,3,0,66,252,247,255,178,5,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,60,255,255,180,6,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,8,151,156,6,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const unsigned char SB_ICON_BT_DIS[1024]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,2,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,1,1,8,153,155,6,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,83,165,43,0,4,0,0,0,0,3,0,61,255,255,181,7,0,2,0,0,0,0,0,0,0,0,0,0,0,0,1,1,224,255,231,47,0,4,0,0,0,3,0,66,252,247,255,182,7,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,112,255,255,232,45,0,4,0,0,3,0,65,255,253,254,255,183,7,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,122,255,255,231,44,0,4,0,3,0,65,255,251,240,255,255,183,7,0,1,0,0,0,0,0,0,0,0,0,0,0,4,0,124,255,255,230,43,0,4,3,0,64,255,253,82,188,255,255,184,10,2,1,0,0,0,0,0,0,0,
|
||||
0,0,0,1,4,0,126,255,255,229,41,0,7,0,68,254,255,59,7,187,252,255,157,0,3,0,0,0,0,0,0,0,0,0,0,0,1,4,0,127,255,255,228,40,0,2,52,255,254,60,2,183,252,255,161,0,3,0,0,0,0,0,0,0,0,0,0,0,0,1,4,0,128,255,255,227,39,0,2,108,255,70,175,255,255,188,13,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,0,130,255,255,226,38,0,0,116,246,255,255,188,10,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,0,132,255,255,225,36,0,0,121,255,187,10,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,0,133,255,255,223,35,0,0,85,16,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,0,134,248,255,222,34,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,1,0,220,251,255,221,33,0,4,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,2,1,5,178,254,255,252,255,220,31,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,4,176,255,255,231,254,252,255,218,30,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,3,175,255,255,179,74,254,254,255,255,217,29,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,3,174,255,255,195,6,58,255,251,212,255,255,216,28,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,7,169,255,255,194,14,0,68,255,255,52,147,253,255,214,27,0,3,0,0,0,0,0,0,0,0,0,0,0,0,3,0,74,255,255,195,14,0,1,65,255,253,83,181,253,255,255,213,26,0,3,0,0,0,0,0,0,0,0,0,0,0,1,0,26,195,178,15,0,6,0,65,255,251,241,255,255,225,255,255,212,25,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,0,65,255,253,253,255,183,16,144,255,255,211,24,0,2,0,0,0,0,
|
||||
0,0,0,0,0,0,0,1,1,1,1,0,3,0,66,252,247,255,183,8,0,0,149,255,255,209,23,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,61,255,255,183,8,0,3,3,0,152,255,255,201,13,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,8,151,156,7,0,2,0,1,3,0,154,255,255,31,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,1,0,106,81,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const unsigned char SB_ICON_BT_SEARCH[1024]={
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,67,179,74,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,191,255,251,84,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,0,2,0,190,252,251,252,87,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,2,0,2,0,190,255,254,255,253,91,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,140,229,104,0,4,3,0,189,255,230,244,255,254,95,0,3,0,0,0,2,4,1,0,0,0,0,0,0,0,0,1,0,215,255,255,110,0,6,0,187,255,175,67,250,255,255,98,0,2,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,2,1,57,238,255,255,111,0,2,188,255,190,0,61,241,253,255,52,0,4,0,75,140,10,1,1,0,0,0,0,0,0,0,2,0,59,239,255,255,115,0,188,255,188,0,98,245,255,248,44,1,4,0,206,255,116,0,4,0,0,0,0,0,0,0,0,4,0,58,239,255,255,102,177,255,177,99,255,255,248,74,0,2,4,0,134,251,210,4,1,1,0,0,0,0,0,0,0,0,4,0,57,239,255,254,243,255,242,254,255,245,70,0,0,0,0,0,49,253,252,44,0,2,0,0,0,0,0,0,0,0,0,4,0,57,238,255,255,255,255,255,243,66,0,0,53,207,52,0,11,223,255,89,0,4,0,0,0,0,0,0,0,0,0,0,4,0,59,225,253,253,252,227,64,0,4,57,233,255,113,0,0,193,255,116,0,4,0,0,0,0,0,0,0,0,0,0,0,7,0,137,255,248,255,141,0,10,0,171,255,249,126,0,0,186,255,124,0,4,0,0,0,0,0,0,0,0,0,0,4,0,107,250,252,254,252,250,109,0,4,29,210,255,108,0,1,197,255,112,0,4,0,0,
|
||||
0,0,0,0,0,0,0,4,0,105,255,255,255,255,255,255,255,107,0,0,29,177,43,0,15,230,255,79,0,3,0,0,0,0,0,0,0,0,4,0,106,255,255,235,225,255,224,234,255,255,108,0,0,0,0,0,59,255,244,28,0,2,0,0,0,0,0,0,0,4,0,107,255,255,243,54,174,255,174,52,242,255,255,107,0,5,4,0,151,252,187,0,2,0,0,0,0,0,0,0,2,0,107,255,255,242,65,0,190,255,191,0,49,240,253,255,54,0,4,0,198,255,83,0,3,0,0,0,0,0,0,3,0,101,255,255,241,62,0,2,187,255,186,0,113,246,254,248,44,0,4,0,42,83,0,1,0,0,0,0,0,0,0,1,0,224,255,239,61,0,7,0,187,255,181,118,255,255,251,77,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,93,179,55,0,4,2,0,190,255,246,255,253,251,79,0,3,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,190,255,251,252,251,80,0,4,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,2,3,2,0,0,2,0,190,252,251,252,81,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,190,255,251,83,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,64,178,77,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static const sb_icon_t sb_icons[] = {
|
||||
{ SB_ICON_WIFI },
|
||||
{ SB_ICON_BT },
|
||||
{ SB_ICON_BATT },
|
||||
{ SB_ICON_VOL },
|
||||
{ SB_ICON_BRIGHT },
|
||||
{ SB_ICON_WIFI_STRONG },
|
||||
{ SB_ICON_WIFI_MEDIUM },
|
||||
{ SB_ICON_WIFI_WEAK },
|
||||
{ SB_ICON_WIFI_NO },
|
||||
{ SB_ICON_WIFI_OFF },
|
||||
{ SB_ICON_BT_NO },
|
||||
{ SB_ICON_BT_CONN },
|
||||
{ SB_ICON_BT_DIS },
|
||||
{ SB_ICON_BT_SEARCH },
|
||||
};
|
||||
|
||||
/* 枚举索引(与 sb_icons[] 对应) */
|
||||
enum { SB_I_WIFI=0, SB_I_BT=1, SB_I_BATT=2, SB_I_VOL=3, SB_I_BRIGHT=4,
|
||||
SB_I_WIFI_STRONG=5, SB_I_WIFI_MEDIUM=6, SB_I_WIFI_WEAK=7,
|
||||
SB_I_WIFI_NO=8, SB_I_WIFI_OFF=9, SB_I_BT_NO=10, SB_I_BT_CONN=11,
|
||||
SB_I_BT_DIS=12, SB_I_BT_SEARCH=13 };
|
||||
#endif /* SB_ICONS_H */
|
||||
@@ -0,0 +1,113 @@
|
||||
/* test_sb_statusbar.c — 宿主交叉验证「同一个状态栏」闭环的纯逻辑(不依赖 /dev/fb0/字库):
|
||||
* 1. 数据源唯一:launcher 经 meow_ui_sys_feed 喂权威快照 → meow_ui_sys_get() 反映一致
|
||||
* (batt/vol/wifi_connected/wifi_level/bt/brightness)。
|
||||
* 2. 系统模式门:launcher 置 system_mode=1 才渲染(meow_ui_sys_statusbar_render 画图标+值);
|
||||
* App 进程默认 0 → render 为 no-op(不画顶条、无双画)。
|
||||
* 3. 图标簇+值:fed 数据 → render 依次调用 meow_gfx_blit_icon(电量/音量/蓝牙/WiFi/亮度)
|
||||
* 与 meow_ui_text_right(%n 值);WiFi 已连-50dBm → WIFI_STRONG。
|
||||
*
|
||||
* 编译(宿主 gcc):
|
||||
* gcc -o test_sb_statusbar test_sb_statusbar.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c \
|
||||
* -I. -I../meow_launcherd
|
||||
*/
|
||||
#include "meow_ui.h"
|
||||
#include "meow_ui_internal.h"
|
||||
#include "meow_ui_sys.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
/* ---- gfx/text/icon/log 打桩(宿主无 fb/字库) ---- */
|
||||
static int g_calls_icon[16]; /* meow_gfx_blit_icon 的 idx 调用计数 */
|
||||
static int g_calls_icon_total = 0;
|
||||
static char g_last_text_right[128]; /* 最近一次 meow_ui_text_right 的串 */
|
||||
static int g_fill_top = 0; /* 清顶条(0,0,w,28)调用计数 */
|
||||
static int g_render_calls = 0; /* statusbar_render 里真正执行了的次数(用 fill 计数近似) */
|
||||
static int g_collapsed = 0;
|
||||
|
||||
int meow_ui_width(void) { return 480; }
|
||||
int meow_ui_text_height(int size) { (void)size; return 20; }
|
||||
int meow_ui_text_width(const char *s, int size) { (void)size; return (int)strlen(s) * 7; }
|
||||
void meow_ui_fill_rect(int x, int y, int w, int h, uint32_t c) {
|
||||
(void)c; if (x == 0 && y == 0 && w == 480 && h == 28) g_fill_top++;
|
||||
}
|
||||
void meow_ui_text(int x, int y, const char *s, int size, uint32_t c) { (void)x;(void)y;(void)s;(void)size;(void)c; }
|
||||
void meow_ui_text_right(int rx, int y, const char *s, int size, uint32_t c) {
|
||||
(void)rx;(void)y;(void)size;(void)c;
|
||||
snprintf(g_last_text_right, sizeof g_last_text_right, "%s", s);
|
||||
}
|
||||
void meow_gfx_blit_icon(int idx, int x, int y, int ink_h, uint32_t fg, int cy) {
|
||||
(void)x;(void)y;(void)ink_h;(void)fg;(void)cy;
|
||||
if (idx >= 0 && idx < 16) g_calls_icon[idx]++;
|
||||
g_calls_icon_total++;
|
||||
}
|
||||
int meow_ui_statusbar_collapsed(void) { return g_collapsed; }
|
||||
void meow_log(meow_log_level lvl, const char *fmt, ...) { (void)lvl;(void)fmt; }
|
||||
|
||||
/* ---- feed 权威快照(模拟 launcher sb_sdk_refresh / app_overlay_statusbar) ---- */
|
||||
static void feed(const meow_ui_feed *f) { meow_ui_sys_feed(f); }
|
||||
|
||||
int main(void)
|
||||
{
|
||||
/* init + 系统模式(launcher 进程) */
|
||||
meow_ui_sys_init();
|
||||
assert(meow_ui_sys_render_enabled() == 0); /* 默认 App 模式 */
|
||||
|
||||
/* 1) 数据源唯一:喂入 → sys_get 一致 */
|
||||
meow_ui_feed f;
|
||||
memset(&f, 0, sizeof f);
|
||||
f.batt = 81; f.charging = 1; f.wifi_on = 1; f.wifi_connected = 1; f.wifi_level = -50;
|
||||
f.bt_seen = 1; f.bt_on = 1; f.vol = 60; f.brightness = 100;
|
||||
feed(&f);
|
||||
const meow_sys_state *s = meow_ui_sys_get();
|
||||
assert(s->batt == 81 && s->charging == 1);
|
||||
assert(s->wifi_on == 1 && s->wifi_connected == 1 && s->wifi_level == -50);
|
||||
assert(s->bt_seen == 1 && s->bt_on == 1);
|
||||
assert(s->vol == 60 && s->brightness == 100);
|
||||
printf("PASS data-source unique: feed -> sys_get consistent (batt=%d vol=%d wifi_lvl=%d bri=%d)\n",
|
||||
s->batt, s->vol, s->wifi_level, s->brightness);
|
||||
|
||||
/* 2a) App 进程(system_mode=0):render 应 no-op(无图标 blit、无顶条 fill),
|
||||
* 但 inset 仍为 28px(App 内容下移让位给 launcher 叠画的状态栏)——即「有 inset、
|
||||
* 无状态栏实例」,根治双画。 */
|
||||
memset(g_calls_icon, 0, sizeof g_calls_icon); g_calls_icon_total = 0; g_fill_top = 0;
|
||||
meow_ui_set_statusbar(1);
|
||||
assert(meow_ui_statusbar_height() == MUI_SBAR_H); /* App 仍 inset 28 */
|
||||
assert(meow_ui_statusbar_visible() == 1);
|
||||
meow_ui_sys_statusbar_render();
|
||||
assert(g_calls_icon_total == 0 && g_fill_top == 0);
|
||||
printf("PASS app-mode gate: render no-op (no icon/fill) + inset=28 -> no double draw\n");
|
||||
|
||||
/* 2b) 系统进程(system_mode=1):render 画图标+值 */
|
||||
meow_ui_sys_set_system_mode(1);
|
||||
assert(meow_ui_sys_render_enabled() == 1);
|
||||
memset(g_calls_icon, 0, sizeof g_calls_icon); g_calls_icon_total = 0; g_fill_top = 0;
|
||||
g_last_text_right[0] = 0;
|
||||
meow_ui_sys_statusbar_render();
|
||||
assert(g_fill_top >= 1); /* 清整条顶栏 */
|
||||
assert(g_calls_icon[MEOW_SB_ICON_BATT] >= 1); /* 电量图标 */
|
||||
assert(g_calls_icon[MEOW_SB_ICON_VOL] >= 1); /* 音量图标 */
|
||||
assert(g_calls_icon[MEOW_SB_ICON_BT_CONN] >= 1);/* 蓝牙连接图标 */
|
||||
assert(g_calls_icon[MEOW_SB_ICON_WIFI_STRONG] >= 1); /* WiFi 已连-50dBm → 强 */
|
||||
assert(g_calls_icon[MEOW_SB_ICON_BRIGHT] >= 1);/* 亮度图标 */
|
||||
assert(g_calls_icon[MEOW_SB_ICON_WIFI_STRONG] >= 1); /* 已连 → 强(正确分档) */
|
||||
assert(g_calls_icon[MEOW_SB_ICON_WIFI_WEAK] == 0);
|
||||
printf("PASS icon cluster: batt/vol/bt/wifi(strong)/bright blitted, values=%s\n",
|
||||
g_last_text_right);
|
||||
|
||||
/* 3) WiFi 弱信号(-80dBm)→ WEAK;关网卡 → 不画 WiFi */
|
||||
memset(g_calls_icon, 0, sizeof g_calls_icon);
|
||||
f.wifi_connected = 1; f.wifi_level = -80; feed(&f);
|
||||
meow_ui_sys_statusbar_render();
|
||||
assert(g_calls_icon[MEOW_SB_ICON_WIFI_WEAK] >= 1);
|
||||
memset(g_calls_icon, 0, sizeof g_calls_icon);
|
||||
f.wifi_on = 0; f.wifi_connected = 0; f.wifi_level = -1000; feed(&f);
|
||||
meow_ui_sys_statusbar_render();
|
||||
assert(g_calls_icon[MEOW_SB_ICON_WIFI_STRONG] == 0 && g_calls_icon[MEOW_SB_ICON_WIFI_WEAK] == 0);
|
||||
printf("PASS wifi tiering: weak(-80)->WEAK, off->no wifi icon\n");
|
||||
|
||||
printf("ALL PASS\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user