新的架构设计文档和核心系统数据结构及接口声明

This commit is contained in:
2026-03-10 06:37:23 +08:00
parent d8cd91ea48
commit 988f1ca17a
16 changed files with 3309 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#pragma once
#include "wm_backend.h"
#include "wm_layout.h"
#include "wm_plan.h"
#include "wm_policy.h"
#include "wm_state.h"
typedef struct wm_runtime_t {
bool running;
wm_state_t state;
wm_plan_t plan;
wm_command_buffer_t command_buffer;
wm_layout_registry_t layouts;
wm_backend_t backend;
} wm_runtime_t;
bool wm_runtime_init(wm_runtime_t *runtime, wm_backend_t backend);
/*
* 处理单个事件,方便做无平台依赖的单元测试。
*/
bool wm_runtime_process_event(wm_runtime_t *runtime, const wm_event_t *event);
void wm_runtime_run(wm_runtime_t *runtime);
void wm_runtime_stop(wm_runtime_t *runtime);
void wm_runtime_shutdown(wm_runtime_t *runtime);