git-subtree-dir: sdk git-subtree-mainline:17a972d46fgit-subtree-split:2e7561d74f
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; }
|