- 新增控件: Button五型(filled/tonal/outlined/text/elevated)/TextField(接IME: round外框idle-outline/focused-primary+占位+光标)/Card/Divider/Badge/Checkbox/Radio/ProgressBar(线圆, value=-1不定)/FAB/TopAppBar(标题+‹返回+动作)/NavigationBar(TabBar pageSwitcher)+TabBar(下划线)/LazyColumn/LazyRow(虚拟化+scroll clamp) - Dialog(B③同构阻塞模态)/BottomSheet(B④), meow_ui_dialog.c - meow_gfx 新增 fill_circle/line/ring_arc(无-lm, COS90象限查表) - 结构体尾缀(对外opaque/calloc归零), 旧字段与create签名零破坏; meow_widget 类型扩到W_TEXTFIELD..W_FAB(17种) - meow_ui.a=18c21da5 hello=5e31d919 launcher=4952261d(重编重链无回归); build_sdk 0warning; 宿主 test_meow_ui_widgets 全PASS+test_sb_collapse PASS+PPM目检正确 - 与 §5.8/§5.2-5.7 一致; 遗留真机观感/性能
25 lines
1.7 KiB
C
25 lines
1.7 KiB
C
/* test_host_stub.c — 宿主逻辑测试打桩:meow_font_* / meow_ui_global_render。
|
||
* 供 test_sb_collapse.c 链真实 meow_ui_gfx.o/meow_ui_sys.o 时提供(无 /dev/fb0、无字库的宿主环境)。
|
||
* 仅为宿主单测编译;不进 meow_ui.a(build_sdk.sh 的 OBJS 不含本文件)。 */
|
||
#include "meow_ui.h"
|
||
#include "meow_font.h" /* 原型(meow_ui_gfx.c include 的同款头) */
|
||
#include <string.h>
|
||
|
||
void meow_font_set_fb(unsigned w, unsigned h, unsigned pitch) { (void)w;(void)h;(void)pitch; }
|
||
int meow_font_load(const char *p, const char *i) { (void)p;(void)i; return -1; } /* 无库:g_mfont_ready=0 → 5x7 回退 */
|
||
void meow_font_unload(void) {}
|
||
int meow_font_reload_tier(int t, const char *p, const char *i) { (void)t;(void)p;(void)i; return -1; }
|
||
void meow_font_drawtext(uint16_t *fb, int x, int y, const char *s, uint16_t c, int size) { (void)fb;(void)x;(void)y;(void)s;(void)c;(void)size; }
|
||
int meow_font_width_text(const char *s, int size) { (void)size; return (int)strlen(s) * 6; }
|
||
int meow_font_line_height(int size) { (void)size; return 20; }
|
||
int meow_font_config_multifont(int on, const char *gp, const char *gi,
|
||
const meow_font_class_cfg cfg[MEOW_FCLS_COUNT],
|
||
int *distinct, int *truncated)
|
||
{ (void)on;(void)gp;(void)gi;(void)cfg;(void)distinct;(void)truncated; return -1; }
|
||
|
||
/* present() 的 App 跨 Activity 全局渲染骨架(宿主无控件,no-op) */
|
||
void meow_ui_global_render(void) {}
|
||
|
||
/* meow_ui_run 触摸分流调用 meow_ui_global_hit(全局控件命中;宿主无全局控件 → 不消费) */
|
||
int meow_ui_global_hit(int x, int y) { (void)x; (void)y; return 0; }
|