diff --git a/README.md b/README.md
index a7c2fbad..827da6bb 100644
--- a/README.md
+++ b/README.md
@@ -1,310 +1,230 @@
-
-
-
-
-
LCUI
-
- The C library for build user interfaces
-
-
-
-
-
-
-
-
-
-## Introduction
-
-[中文版说明文档](README.zh-cn.md)
-
-LCUI is a library written in C for building graphical user interfaces. Its goal is to explore and practice new ways of developing user interfaces, characterized by its small size, ease of use, and provision of convenient development tools to help developers quickly create desktop applications with graphical user interfaces.
-
-**LC** originates from the initials of the author's name. The library was initially designed to help the author develop small projects and gain development experience. However, the author did not gain a competitive advantage in the job market, which is crowded with C/C++ experts, and thus had to work in web front-end development. As a result, LCUI now leans towards integrating technologies from the web front-end domain.
-
-### Key Features
-
-- **Cross-platform:** Supports Windows and Linux.
-- **Fully custom-drawn components:** Ensures consistent appearance and behavior of components across platforms.
-- **DPI awareness:** Automatically scales the UI on high-resolution screens to maintain a clear display.
-- **Built-in CSS engine:** Enables the use of CSS for defining UI styles and layouts, making it easier for developers with web development experience to get started.
-- **Modern development tools:** Includes tools that allow you to build user interfaces using [TypeScript](https://lcui-dev.github.io/docs/guide/typescript) with JSX syntax, the React library, and other web frontend technologies.
-
-### Development Experience Preview
-
-You can get an overview of the development experience for LCUI applications from the following image:
-
-
-
-- **Component Development in React-like Style:** Writing UI configuration files using TypeScript. With the combined advantages of TypeScript, JSX syntax, and the LCUI React library, you can succinctly describe UI structure, resource dependencies, component states, data binding, and event binding.
-- **Various Stylesheet Writing Methods:** [Tailwind CSS](https://tailwindcss.com/), [CSS Modules](https://github.com/css-modules/css-modules), [Sass](https://sass-lang.com/), and global CSS.
-- **File-system based router:** Organize application pages in directory form, with each page corresponding to a directory. The path of the directory serves as the route for that page. With the built-in application router, you can easily implement page switching and navigation without manual route configuration.
-- **User-friendly and Modern Icon Library:** Icons are sourced from the [fluentui-system-icons](https://github.com/microsoft/fluentui-system-icons) library, with partial customization to fit LCUI's characteristics, offering similar usage patterns.
-- **Command-line Development Tool:** Run the `lcui build` command to preprocess configuration files within the app directory, then generate corresponding C source code and resource files.
-
-### Architecture
-
-Over time LCUI has been built up to be based on various libraries:
-
-- [lib/yutil](./lib/yutil): Utility library providing common data structures and functions.
-- [lib/pandagl](./lib/pandagl): PandaGL (Panda Graphics Library), a graphics library offering font management, text layout, image processing, and rendering capabilities.
-- [lib/css](./lib/css): CSS parser and selector engine, enabling CSS parsing and selection functionalities.
-- [lib/ptk](./lib/ptk): Platform Toolkit library offering cross-platform unified system-related APIs, including message loops, window management, timers, worker threads, and input methods.
-- [lib/thread](./lib/thread): Thread library offering cross-platform multithreading capabilities.
-- [lib/router](./lib/router): Router manager offering routing and navigation functionalities.
-- [lib/ui](./lib/ui): Core UI library that manages UI components, event queues, style computation, drawing, and other essential UI functionalities.
-- [lib/ui-xml](./lib/ui-xml): XML parsing library enabling the creation of UI components from XML file content.
-- [lib/ui-server](./lib/ui-server): UI server that maps UI components to system windows, including cursor rendering for the framebuffer backend.
-
-The core source code of LCUI is located in the `src/` directory and is divided into the following modules:
-
-- **app:** Application lifecycle, event, and UI management.
-- **fonts:** Default font settings.
-- **settings:** Global settings, providing switches and parameter configurations for certain features.
-- **ui:** UI and window management.
-- **widgets:** Predefined components.
-- **worker:** Asynchronous task management.
-
-## Quick Start
-
-Before you begin, you need to install the following software on your computer:
-
-- [Git](https://git-scm.com/download/): Version control tool used to download the source code of the example project.
-- [XMake](https://xmake.io/#/zh-cn/?id=%e5%ae%89%e8%a3%85): Build tool used to build the project.
-- [Node.js](https://nodejs.org/): JavaScript runtime environment used to run the LCUI command-line development tool.
-
-Then, run the following commands in a command-line window:
-
-```shell
-# Install the LCUI command-line development tool
-npm install -g @lcui/cli
-
-# Create an LCUI application project
-lcui create my-lcui-app
-```
-
-Follow the prompts provided by the commands afterward.
-
-## Documentation
-
-- [Online Documentation](https://lcui-dev.github.io/docs/next/guides/base/)
-- [Request for Comments (RFC)](https://lcui-dev.github.io/docs/next/rfcs/)
-- [Changelog](CHANGELOG.md)
-- [Contribution Guidelines](.github/CONTRIBUTING.md)
-
-### Tutorials
-
-
-
-
- | Title |
- Preview |
- Summary |
-
-
-
-
- |
- Image Viewer
- |
-  |
- Develop an image viewer program based on the LCUI library, build its graphical interface with web technologies, implement the interface interaction logic and various functions with C language, and deeply explore the features and development techniques of LCUI in the UI aspect. |
-
-
- |
- Todo List
- |
-  |
- Learn the basic concepts and usage of LCUI, as well as how to use it to build UI and implement state management, UI updates, and interactions. |
-
-
- |
- Fabric
- |
-  |
- Rewrite the existing fabric simulation program's JavaScript source code in C language, and use the cairo graphics library for fabric rendering. Then, apply LCUI to implement fabric animation playback and interaction. |
-
-
- |
- Browser
- (Outdated)
- |
-  |
- Referencing a web browser, use LCUI to implement similar UI structure, layout, style, and multi-tab management features. Utilize LCUI's routing management functionality to implement multi-tab page state management and navigation, as well as a simple file browsing page. |
-
-
-
-
-## Roadmap
-
-Below are the items for potential future development:
-
-- **LCUI**
-
- - Improve API design.
- - Enhance the CSS engine to support `inherit` and `!important`.
- - Add an [SDL](https://www.libsdl.org/) backend to replace the lib/ptk library.
- - Adapt other open-source graphics libraries to achieve better rendering performance.
- - Multi language support for internationalization.
- - Optimize memory usage.
- - Improve performance.
-
-- **Command-Line Tools**
-
- - `lcui build --watch`: Continuously monitor file changes and automatically rebuild.
- - `lcui dev-server`: Similar to webpack-dev-server, build LCUI applications as websites to allow developers to preview UI in the browser.
- - Add build caching to rebuild only the modified files.
-
-- **React Component Library**
- Develop a component library for LCUI applications using TypeScript + React, inspired by some web frontend component libraries (e.g., [radix](https://www.radix-ui.com/), [shadcn/ui](https://ui.shadcn.com/)), and reuse components from the [LC Design](https://github.com/lcui-dev/lc-design) library.
-
-- **Documentation**
- - Tutorials
- - Request for Comments (RFC)
-
-## Contribution
-
-Think LCUI is slow to update? there are many ways to [contribute](.github/CONTRIBUTING.md) to LCUI.
-
-- [Submit bugs](https://github.com/lc-soft/LCUI/issues) and help us verify fixes as they are checked in.
-- Share some interesting ideas related to GUI development in the [issues page](https://github.com/lc-soft/LCUI/issues).
-- [Search for FIXME comments](https://github.com/lc-soft/LCUI/search?l=C&q=FIXME) in the source code and try to fix them.
-- Fund the issues that interest you on [IssueHunt](https://issuehunt.io/r/lc-soft/LCUI) to attract other developers to contribute.
-- Review the [source code changes](https://github.com/lc-soft/LCUI/pulls).
-- [Contribute bug fixes](CONTRIBUTING.md).
-
-LCUI has adopted the code of conduct defined by the Contributor Covenant. This document is used across many open source communities, and we think it articulates our values well. For more, see the [Code of Conduct](CODE_OF_CONDUCT.md).
-
-## FAQ
-
-**Compilation error**
-
-The build configuration of this project has included the "Treat Warnings as Errors" compilation option. This might be because your compiler is relatively new and can detect more issues from the code.
-
-You can try to search for all xmake.lua files that contain `set_warnings("all", "error")` and remove this rule.
-
-**Is this a browser engine? Or a development library like Electron that integrates a browser environment?**
-
-No, you can think of it as a traditional GUI development library that incorporates some web technologies.
-
-**Why should I choose LCUI over other GUI libraries/frameworks?**
-
-It's recommended to prioritize other GUI libraries/frameworks, as LCUI currently lacks:
-
-- **Rich Built-in Components:** You will need to build almost all the components in your UI from scratch, leading to higher development costs.
-- **Efficient Graphics Rendering Performance:** Interfaces with extensive and complex content may experience lag.
-- **Animation System:** The lack of visual feedback affects the user interaction experience.
-- **Detailed and User-friendly Documentation**: The existing documentation and examples are only for a simple understanding. If you want to study in depth, you need to read the source code, so the learning cost is relatively high.
-- **Active Updates**: Limited by the maintainer's personal interests and time, the update frequency of this project is very low. Therefore, the functional requirements or bugs you submit may not necessarily be resolved, especially those in the old versions.
-
-Given its current state, LCUI is best suited for fulfilling the maintainer's personal needs or developing simple tools with minimal UI content and interactions.
-
-**Support development with TypeScript? If I know how to use it, why wouldn’t I just go with Electron?**
-
-Currently, TypeScript is primarily used to describe UI and resource dependencies, with only a few TypeScript features in use. You don’t need to study it in depth; in most cases, you can simply refer to example code for implementation.
-
-If you have extensive web development experience and are willing to learn Electron, then Electron is clearly the better choice.
-
-**How about CSS support?**
-
-The following is a list of supported CSS features. Checked is supported (But does not mean full support). Unlisted properties are not supported by default.
-
-
- CSS feature coverage
-
-- at rules
- - [x] `@font-face`
- - [ ] `@keyframes`
- - [ ] `@media`
-- keywords
- - [ ] `!important`
-- selectors
- - [x] `*`
- - [x] `type`
- - [x] `#id`
- - [x] `.class`
- - [x] `:hover`
- - [x] `:focus`
- - [x] `:active`
- - [x] `:first-child`
- - [x] `:last-child`
- - [ ] `[attr="value"]`
- - [ ] `:not()`
- - [ ] `:nth-child()`
- - [ ] `parent > child`
- - [ ] `a ~ b`
- - [ ] `::after`
- - [ ] `::before`
- - [ ] ...
-- units
- - [x] px
- - [x] dp
- - [x] sp
- - [x] pt
- - [x] %
- - [ ] rem
- - [ ] vh
- - [ ] vw
-- properties
- - [x] top, right, bottom, left
- - [x] width, height
- - [x] visibility
- - [x] display
- - [x] none
- - [x] inline-block
- - [x] block
- - [x] flex
- - [ ] inline-flex
- - [ ] inline
- - [ ] grid
- - [ ] table
- - [ ] table-cell
- - [ ] table-row
- - [ ] table-column
- - [ ] ...
- - [x] position
- - [x] static
- - [x] relative
- - [x] absolute
- - [ ] fixed
- - [x] box-sizing
- - [x] border-box
- - [x] content-box
- - [x] border
- - [x] border-radius
- - [x] background-color
- - [x] background-image
- - [x] background-position
- - [x] background-cover
- - [ ] background
- - [x] pointer-events
- - [x] cursor
- - [x] font-face
- - [x] font-family
- - [x] font-size
- - [x] font-style
- - [x] flex
- - [x] flex-shrink
- - [x] flex-grow
- - [x] flex-basis
- - [x] flex-wrap
- - [x] flex-direction
- - [x] justify-content
- - [x] flex-start
- - [x] center
- - [x] flex-end
- - [x] align-items
- - [x] flex-start
- - [x] center
- - [x] flex-end
- - [x] stretch
- - [ ] float
- - [ ] transition
- - [ ] transform
- - [ ] ...
-
-
-
-## License
-
-The LCUI Project is released under [the MIT License](<(https://opensource.org/licenses/MIT)>).
+
+
+
+
+
LCUI
+
+ The C library for building user interfaces
+
+
+ 中文 / English
+
+
+
+
+
+
+
+
+
+
+## Introduction
+
+LCUI is a library written in C for building graphical user interfaces. Its goal is to explore and practice new ways of developing user interfaces, characterized by its small size, ease of use, and provision of convenient development tools to help developers quickly create desktop applications with graphical user interfaces.
+
+**LC** originates from the initials of the author's name. LCUI began as a way for the author to build small projects and gain development experience. He did not gain an edge in the crowded C/C++ job market, however, and had no choice but to move into web front-end development; as a result, LCUI now leans towards integrating web technologies.
+
+### Key Features
+
+- **Cross-platform:** Windows and Linux.
+- **Fully custom-drawn widgets:** consistent appearance and behavior across platforms.
+- **Rich built-in widgets:** buttons, inputs, selects, dialogs, alerts, badges, items, and more.
+- **CSS layout and styling:** approachable for developers with web experience.
+- **DPI awareness:** automatic scaling on high-resolution screens.
+- **Modern tooling:** describe UI with TypeScript + JSX + React; `lcui build` generates C source.
+
+> [!WARNING]
+> This document targets the next release; some features and design are still in development. Content is for reference only.
+
+## Core concepts
+
+- **Widgets**: the UI is built from widgets; widgets nest to form a widget tree (similar to the web DOM).
+- **Events**: input events enter through a window and travel along the widget tree; focus decides where keyboard input goes.
+- **Frame loop**: the main loop processes events, updates state, repaints dirty regions, and drives animations and async work.
+- **Windows**: a window is a render target that hosts a widget tree and handles size, DPI, and close events.
+
+## Architecture
+
+LCUI is built on top of these libraries:
+
+- [`lib/yutil`](./lib/yutil): common data structures and utilities.
+- [`lib/pandagl`](./lib/pandagl): fonts, text layout, image I/O, and rendering.
+- [`lib/css`](./lib/css): CSS parser and selector engine.
+- [`lib/ptk`](./lib/ptk): cross-platform message loop, windows, timers, and IME.
+- [`lib/thread`](./lib/thread): cross-platform threading.
+- [`lib/router`](./lib/router): route mapping and navigation.
+- [`lib/ui`](./lib/ui): widgets, events, styles, and drawing.
+- [`lib/ui-xml`](./lib/ui-xml): create UI from XML.
+- [`lib/ui-server`](./lib/ui-server): maps widgets to system windows.
+
+Core source lives in `src/`: `app`, `fonts`, `settings`, `ui`, `widgets`, `worker`.
+
+## Quick Start
+
+### Run Hello World
+
+```shell
+git clone https://github.com/lc-soft/LCUI.git
+cd LCUI
+xmake run hello
+```
+
+### Minimal program
+
+```c
+#include
+/* Windows: provides the WinMain → main entry wrapper */
+#include
+
+int main(int argc, char **argv)
+{
+ ui_widget_t *text;
+ lcui_window_t *win;
+
+ /**
+ * Build the window options
+ * title: window title
+ * id: window state id, used to save/restore geometry
+ * width/height: default client size on first run
+ */
+ lcui_window_options_t opt = {
+ .title = L"Hello",
+ .id = "main",
+ .width = 800,
+ .height = 600,
+ };
+
+ /* initialize LCUI subsystems */
+ lcui_init();
+
+ text = ui_create_widget("text");
+ ui_text_set_content(text, "Hello, LCUI!");
+ /* attach the text to the root widget so the window can render it */
+ ui_root_append(text);
+
+ /* Create the window and bind the root widget as its content; it stays hidden */
+ win = lcui_window_create_for_widget(ui_root(), &opt);
+
+ /* load the config and restore the saved window geometry */
+ lcui_load_settings("dev.example.hello");
+
+ /* Show the window; it becomes visible after the first rendered frame */
+ lcui_window_show(win);
+
+ /* run the main loop and clean up on exit */
+ return lcui_main();
+}
+```
+
+### Browse all widgets (optional)
+
+`doc-viewer` showcases all built-in widgets, styles, and interactions. Building it requires Node.js and `@lcui/cli`:
+
+```shell
+npm install -g @lcui/cli
+cd examples/doc-viewer
+npm install
+lcui build --skip-xmake
+cd ../..
+xmake run doc-viewer
+```
+
+### Create a new project
+
+`@lcui/cli` is the command-line tool for LCUI. It scaffolds projects, compiles TSX/CSS resources into C source, and works with xmake to build the app.
+
+```shell
+npm install -g @lcui/cli
+lcui create my-lcui-app
+```
+
+Follow the prompts.
+
+#### Manual xmake setup
+
+Without the scaffold, write `xmake.lua` directly:
+
+```lua
+add_repositories("lcui-repo https://github.com/lcui-dev/xmake-repo.git")
+add_requires("lcui")
+
+target("my-app")
+ set_kind("binary")
+ add_files("src/*.c")
+ add_packages("lcui")
+```
+
+Then run:
+
+```shell
+xmake run my-app
+```
+
+The `lcui` package is self-contained. Do not also depend on the sub-library packages (`pandagl`, `css`, `ptk`, ...) in the same target, or you will get duplicate symbols. If you only need one sub-library, use e.g. `add_requires("pandagl")`.
+
+## Documentation & examples
+
+- [Online documentation](https://lcui-dev.github.io/docs/next/guides/base/)
+- [Bundled examples](examples/): `hello`, `todolist`, `fabric`, `doc-viewer`
+- Tutorials: [Image viewer](https://lcui-dev.github.io/docs/tutorials/kantu), [Todo list](https://lcui-dev.github.io/docs/tutorials/todolist), [Fabric animation](https://lcui-dev.github.io/docs/tutorials/render-fabric)
+- [RFCs](https://lcui-dev.github.io/docs/next/rfcs/) / [Changelog](CHANGELOG.md) / [Contributing](.github/CONTRIBUTING.md)
+
+## Build and test from source
+
+```shell
+git clone https://github.com/lc-soft/LCUI.git
+cd LCUI
+xmake build
+xmake test
+```
+
+## Contributing
+
+- Improve the docs and examples under `lib/`.
+- [Report issues](https://github.com/lc-soft/LCUI/issues) and verify fixes.
+- Search for [FIXME](https://github.com/lc-soft/LCUI/search?l=C&q=FIXME) / [TODO](https://github.com/lc-soft/LCUI/search?l=C&q=TODO) comments and fix them.
+- Review [pull requests](https://github.com/lc-soft/LCUI/pulls).
+
+This project follows the Contributor Covenant [Code of Conduct](CODE_OF_CONDUCT.md).
+
+## FAQ
+
+### Compilation errors
+
+The build treats warnings as errors. A newer compiler may report more issues. Search all `xmake.lua` files for `set_warnings("all", "error")` and remove that rule.
+
+### Is this a browser engine, or an Electron-like library with an embedded browser?
+
+No. Think of it as a traditional GUI library that borrows some web technologies.
+
+### Why choose LCUI over other GUI libraries?
+
+Consider other GUI libraries first. LCUI currently lacks:
+
+- **Widget coverage is still limited**: common widgets are built in, but complex or specialized controls still need to be built yourself.
+- **Fast graphics rendering**: no GPU acceleration; large, complex UIs may stutter.
+- **Animation system**: limited visual feedback.
+- **Detailed documentation**: existing docs and examples are introductory; deep learning requires reading the source.
+- **Frequent updates**: limited by the maintainer's time; requested features or bugs may not be resolved.
+
+Given its current state, LCUI is best for simple tools with minimal UI content and interaction, or the maintainer's personal needs.
+
+### If it uses TypeScript, why not just use Electron?
+
+TypeScript is mainly used to describe UI and resource dependencies; few language features are involved, so you can follow the examples. If you have solid web experience and are willing to learn Electron, Electron is the better choice.
+
+### Please add macOS / Android support
+
+Those ports are expensive to develop and maintain and are not currently planned. If you need them, you can try implementing them, e.g. as separate `lcui-macos` / `lcui-android` projects.
+
+### I want a feature like the one in another project
+
+Open an [issue](https://github.com/lc-soft/LCUI/issues/new/choose) and fill in the template. Describe the need clearly and, if possible, include an implementation idea and references. You can also follow the existing [RFCs](https://lcui-dev.github.io/docs/next/rfcs/).
+
+### Please add Python / Go / Rust / C# / Java bindings
+
+The CLI already compiles TypeScript UI descriptions into C source, which covers most needs, so the author will not add other language bindings. You are welcome to design one yourself.
+
+## License
+
+[MIT](http://opensource.org/licenses/MIT)
diff --git a/README.zh-cn.md b/README.zh-cn.md
index cfa130cd..ace9754b 100644
--- a/README.zh-cn.md
+++ b/README.zh-cn.md
@@ -1,335 +1,232 @@
-
-
-
-
-
LCUI
-
- 用于开发图形用户界面的 C 库
-
-
-
-
-
-
-
-
-
-## 介绍
-
-LCUI 是一个用 C 语言编写的用于构建图形用户界面的库。它的定位是探索和实践新的用户界面开发方式,以体积小、易于使用、提供便捷的开发工具为特点,帮助开发者快速开发带有图形用户界面的桌面端应用程序。
-
-**LC** 源自作者名字首字母,设计之初的目的是为了方便作者开发一些小项目和积累开发经验,不过遗憾的是作者并没有因此在 C/C++ 高手众多的就业环境下获得足够竞争优势,于是只能从事 Web 前端开发工作,也正是因为如此,LCUI 现在的发展方向偏向于融合 Web 前端领域的技术。
-
-### 主要特性
-
-- **跨平台:** 支持 Windows、Linux。
-- **全自绘组件:** 组件在多个平台中都能保持一致的外观和行为。
-- **DPI 感知:** 在高分辨率的屏幕内自动缩放界面以保持清晰的显示效果。
-- **自带 CSS 引擎:** 支持使用 CSS 来定义用户界面的样式和布局,对于有网页开发经验的人比较容易上手。
-- **提供现代化的开发工具:** 该工具允许你使用 [TypeScript](https://lcui-dev.github.io/docs/guide/typescript) 语言搭配 JSX 语法、 React 库以及其它 Web 前端技术来编写用户界面。
-
-### 开发体验预览
-
-你可以从下图了解 LCUI 应用程序的开发体验:
-
-
-
-- **类 React 组件开发方式:** 用 TypeScript 语言编写界面配置文件,结合 TypeScript 的语言优势、JSX 语法特性和 LCUI React 库,你能够以简洁的代码描述界面结构、资源依赖、组件状态、数据绑定以及事件绑定。
-- **多种样式编写方式:** [Tailwind CSS](https://tailwindcss.com/)、[CSS Modules](https://github.com/css-modules/css-modules)、[Sass](https://sass-lang.com/)、全局 CSS。
-- **基于目录的路由定义方式:** 以文件目录的形式组织应用的各个页面,每个页面对应一个目录,目录的路径即是该页面的路由。借助内置的应用路由器,你可以轻松地实现页面之间的切换和导航,无需手动配置路由规则。
-- **友好且现代的图标库:** 图标源自 [fluentui-system-icons](https://github.com/microsoft/fluentui-system-icons) 库,针对 LCUI 的特性做了部分定制,用法相似。
-- **命令行开发工具:** 运行 `lcui build` 命令预处理 app 目录内的配置文件,然后生成相应的 C 源码和资源文件。
-
-### 架构
-
-LCUI 建立在各种库的基础之上:
-
-- [lib/yutil](./lib/yutil): 实用工具库,提供常用的数据结构和函数。
-- [lib/pandagl](./lib/pandagl): PandaGL (Panda Graphics Library) 图形库,提供字体管理、文字排版、图片读写、图形处理和渲染能力。
-- [lib/css](./lib/css): CSS 解析器和选择引擎,提供 CSS 解析和选择能力。
-- [lib/ptk](./lib/ptk): 平台库(**P**ing **T**ai **K**u),提供跨平台统一的系统相关 API,包括消息循环、窗口管理、定时器、工作线程、输入法等。
-- [lib/thread](./lib/thread): 线程库,提供跨平台的多线程能力。
-- [lib/router](./lib/router): 路由管理器,提供路由映射和导航能力。
-- [lib/ui](./lib/ui): UI 核心库,提供 UI 组件管理、事件队列、样式计算、绘制等 UI 必要能力。
-- [lib/ui-xml](./lib/ui-xml): XML 解析库,提供从 XML 文件内容创建 UI 的能力。
-- [lib/ui-server](./lib/ui-server): UI 服务器,提供将 UI 组件映射至系统窗口的能力,并包含 framebuffer 后端的光标绘制。
-
-LCUI 的核心源码位于 `src/` 目录,划分为以下几个功能模块:
-
-- **app:** 应用的生命周期、事件 和 UI 管理。
-- **fonts:** 默认字体设置。
-- **settings:** 全局设置,提供部分功能的开关和参数设置。
-- **ui:** UI 和窗口管理。
-- **widgets:** 预置的组件。
-- **worker:** 异步任务管理。
-
-## 快速体验
-
-在开始前你需要在你的计算机上安装以下软件:
-
-- [Git](https://git-scm.com/download/):版本管理工具,用于下载示例项目源码。
-- [XMake](https://xmake.io/#/zh-cn/?id=%e5%ae%89%e8%a3%85):C/C++ 构建工具,用于构建项目。
-- [Node.js](https://nodejs.org/): JavaScript 运行环境,用于运行 LCUI 的命令行开发工具。
-
-然后在命令行窗口中运行以下命令:
-
-```shell
-# 安装 LCUI 命令行开发工具
-npm install -g @lcui/cli
-
-# 创建 LCUI 应用程序项目
-lcui create my-lcui-app
-```
-
-之后按照命令输出的提示继续操作。
-
-## 文档
-
-- [在线文档](https://lcui-dev.github.io/docs/next/guides/base/)
-- [意见征集稿(RFC)](https://lcui-dev.github.io/docs/next/rfcs/)
-- [更新日志](CHANGELOG.zh-cn.md)
-- [贡献指南](.github/CONTRIBUTING.md)
-
-### 教程
-
-
-
-
- | 标题 |
- 预览 |
- 简介 |
-
-
-
-
- |
- 图像查看器
- |
-  |
- 基于 LCUI 库开发一个图像查看器程序,用 Web 技术为其构建图形界面,用 C 语言实现界面交互逻辑和各项功能,深入发掘 LCUI 在 UI 方面的特性和开发技巧。 |
-
-
- |
- 待办清单
- |
-  |
- 学习 LCUI 的基本概念和用法,以及如何使用它构建界面,并实现状态管理、界面更新和交互。 |
-
-
- |
- 渲染布料动画
- |
-  |
- 参照现有的布料模拟程序的 JavaScript 源码,以 C 语言重新编写,并采用 cairo 图形库进行布料渲染,再运用 LCUI 实现布料动画的播放和交互。 |
-
-
- |
- 浏览器
- (已过时)
- |
-  |
- 参照网页浏览器,用 LCUI 实现与之类似的界面结构、布局、样式和多标签管理功能,并运用 LCUI 路由管理功能实现多标签页的状态管理和导航,以及一个简单的文件浏览页面。 |
-
-
-
-
-## 路线图
-
-以下是未来可推进的事项:
-
-- LCUI
- - 改进 API 设计。
- - 改进 CSS 引擎,增加支持 `inherit`、`!important`。
- - 添加 [SDL](https://www.libsdl.org/) 后端,代替 lib/ptk 库。
- - 适配其它开源图形库,以获得更好的渲染性能。
- - i18n 多语言支持。
- - 优化内存占用。
- - 优化性能。
-- 命令行工具
- - `lcui build --watch`:持续监听文件变更并自动重新构建。
- - `lcui dev-server`:与 webpack-dev-server 类似,将 LCUI 应用构建为网站以便开发者在浏览器中预览界面。
- - 添加构建缓存,仅重新构建有更改的文件。
-- React 组件库:参考一些 web 前端组件库(例如:[radix](https://www.radix-ui.com/)、[shadcn/ui](https://ui.shadcn.com/)),用 TypeScript + React 开发一个适用于 LCUI 应用程序的组件库,复用 [LC Design](https://github.com/lcui-dev/lc-design) 组件库中的组件。
-- 文档
- - 教程
- - 意见征集稿(RFC)
-
-## 贡献
-
-有很多方式可以为此项目的发展做贡献:
-
-- 完善 lib 目录中各个库的自述文档,内容包括但不仅限于补充示例代码、相关功能讲解、运行效果图等。
-- [反馈问题](https://github.com/lc-soft/LCUI/issues)并在问题关闭时帮助我们验证它们是否已经修复。
-- 在源码中搜索 [FIXME 注释](https://github.com/lc-soft/LCUI/search?l=C&q=FIXME)和 [TODO 注释](https://github.com/lc-soft/LCUI/search?l=C&q=TODO),然后尝试解决它们。
-- 审查[源代码的改动](https://github.com/lc-soft/LCUI/pulls)。
-- 修复已知问题。
-
-本项目采用了参与者公约定义的行为准则,该文档应用于许多开源社区,有关更多信息,请参阅[《行为准则》](CODE_OF_CONDUCT.zh-cn.md)。
-
-## 常见问题
-
-**编译报错了**
-
-本项目的构建配置加入了"将警告视为错误"编译选项,可能是因为你的编译器比较新,能够从代码中发现更多问题。你可以尝试搜索所有包含 `set_warnings("all", "error")` 的 xmake.lua 文件然后将这项规则删除。
-
-**这是一个浏览器内核吗?或者是像 Electron 这样的集成了浏览器环境的开发库?**
-
-不是,你可以当成是一个应用了部分 Web 技术的传统 GUI 开发库。
-
-**相比其它 GUI 库/框架,我为什么选择 LCUI?**
-
-建议优先考虑其它 GUI 库/框架,因为 LCUI 目前缺少:
-
-- **丰富的预置组件:** 你需要从零开始实现界面中几乎所有的组件,开发成本较高。
-- **高效的图形渲染性能:** 没有 GPU 加速,界面内容较多且较大时,可能会出现卡顿。
-- **动画系统:** 界面没有动效反馈,影响交互体验。
-- **详尽且友好的文档:** 现有的文档和示例仅供简单了解,想要深入学习则需要阅读源码,因此学习成本较高。
-- **积极的更新:** 受限于维护者的个人兴趣和时间,此项目的更新频率非常低。因此你提交的功能需求或 BUG 并不一定会被解决,尤其是旧版本中的。
-
-以 LCUI 现有的条件,除了满足维护者的个人需求外,也就只适用于开发一些界面内容和交互都很简单的小工具。
-
-**都用上 TypeScript 语言了,那我为什么不直接用 Electron?**
-
-目前,TypeScript 语言主要用于描述界面和资源依赖,用到的 TypeScript 特性较少,并不需要你深入学习并它,大多数情况下你只需要参考示例代码进行编写。
-
-如果你有较丰富的 web 开发经验且愿意学习 Electron,显然 Electron 是最合适的选择。
-
-**建议添加 MacOS、Android 系统支持!**
-
-这些特性的开发和维护成本较高,暂无相关计划。如果你迫切需要这些特性,你可以尝试实现它们,例如新建 lcui-macos 和 lcui-android 项目,然后在相关专业人员和 AI 的帮助下完成它们。
-
-**我想要 ???? 功能,就像 ???? 里的那样。**
-
-请先[新建 issue](https://github.com/lc-soft/LCUI/issues/new/choose),按照已有的模板补全内容,我们建议你尽量将需求描述清楚,如果能提供开发思路、相关参考文档等内容那是最好的,例如:
-
-```markdown
-# 建议添加 xxx
-
-(简介)xxx 是......
-(特性)它能够......
-(理由)对于 LCUI 它能解决 ...... 等问题
-(实现思路)大致的实现方法是先这样......然后......再......最后......
-(参考资料)具体可参考这些 ......
-```
-
-你也可以参考现有的[意见征集稿(RFC)](https://lcui-dev.github.io/docs/next/rfcs/)来撰写内容。
-
-不推荐的写法:
-
-```markdown
-# 建议添加 xxx
-
-如题,我觉得很有必要,请添加,谢谢。
-```
-
-**求添加 Python/Go/Rust/C#/Java 语言绑定!**
-
-LCUI 的命令行开发工具已经支持将 TypeScript 写的界面配置文件编译为 C 源文件,虽然不是语言绑定但也够用,所以作者不会再添加其它语言绑定。
-
-如果你实在需要的话可以自己动手设计,毕竟你比作者更懂这些语言的编程思想和设计哲学,也算是一个展现技术实力的好机会。
-
-**CSS 标准的支持程度如何?**
-
-以下列出了支持的 CSS 特性。勾选的即是支持(但并不意味着完全支持),未列出特性则默认不支持。
-
-
- CSS 特性覆盖情况
-
-- at rules
- - [x] `@font-face`
- - [ ] `@keyframes`
- - [ ] `@media`
-- keywords
- - [ ] `!important`
-- selectors
- - [x] `*`
- - [x] `type`
- - [x] `#id`
- - [x] `.class`
- - [x] `:hover`
- - [x] `:focus`
- - [x] `:active`
- - [x] `:first-child`
- - [x] `:last-child`
- - [ ] `[attr="value"]`
- - [ ] `:not()`
- - [ ] `:nth-child()`
- - [ ] `parent > child`
- - [ ] `a ~ b`
- - [ ] `::after`
- - [ ] `::before`
- - [ ] ...
-- units
- - [x] px
- - [x] dp
- - [x] sp
- - [x] pt
- - [x] %
- - [ ] rem
- - [ ] vh
- - [ ] vw
-- properties
- - [x] top, right, bottom, left
- - [x] width, height
- - [x] visibility
- - [x] display
- - [x] none
- - [x] inline-block
- - [x] block
- - [x] flex
- - [ ] inline-flex
- - [ ] inline
- - [ ] grid
- - [ ] table
- - [ ] table-cell
- - [ ] table-row
- - [ ] table-column
- - [ ] ...
- - [x] position
- - [x] static
- - [x] relative
- - [x] absolute
- - [ ] fixed
- - [x] box-sizing
- - [x] border-box
- - [x] content-box
- - [x] border
- - [x] border-radius
- - [x] background-color
- - [x] background-image
- - [x] background-position
- - [x] background-cover
- - [ ] background
- - [x] pointer-events
- - [x] cursor
- - [x] font-face
- - [x] font-family
- - [x] font-size
- - [x] font-style
- - [x] flex
- - [x] flex-shrink
- - [x] flex-grow
- - [x] flex-basis
- - [x] flex-wrap
- - [x] flex-direction
- - [x] justify-content
- - [x] flex-start
- - [x] center
- - [x] flex-end
- - [x] align-items
- - [x] flex-start
- - [x] center
- - [x] flex-end
- - [x] stretch
- - [ ] float
- - [ ] transition
- - [ ] transform
- - [ ] ...
-
-
-
-具体的属性和值的支持情况可查看:[lib/css/src/properties.c](lib/css/src/properties.c#L177)
-
-## 许可
-
-[MIT](http://opensource.org/licenses/MIT)
+
+
+
+
+
LCUI
+
+ 用于开发图形用户界面的 C 库
+
+
+ 中文 / English
+
+
+
+
+
+
+
+
+
+
+## 介绍
+
+LCUI 是一个用 C 语言编写的用于构建图形用户界面的库。它的定位是探索和实践新的用户界面开发方式,以体积小、易于使用、提供便捷的开发工具为特点,帮助开发者快速开发带有图形用户界面的桌面端应用程序。
+
+**LC** 源自作者名字首字母。LCUI 最初是为了方便作者开发小项目、积累开发经验;但作者并没有因此在 C/C++ 高手众多的就业环境中获得优势,无奈之下转而从事 Web 前端开发。也正因如此,LCUI 如今的发展方向更偏向融合 Web 前端领域的技术。
+
+### 主要特性
+
+- **跨平台**:支持 Windows 与 Linux。
+- **全自绘组件**:组件在各平台外观与行为一致。
+- **丰富的预置组件**:按钮、输入框、选择器、对话框、提示、徽章、列表项等。
+- **CSS 布局与样式**:有 Web 开发经验可以快速上手。
+- **DPI 感知**:高分辨率屏幕下自动缩放。
+- **现代化工具链**:可用 TypeScript + JSX + React 描述界面,由 `lcui build` 生成 C 源码。
+
+> [!WARNING]
+> 本文档面向下个版本,部分功能和设计仍在开发中,内容仅供参考。
+
+## 核心概念
+
+- **部件(widget)**:界面由部件组成;部件可以嵌套,形成一棵部件树(类似 Web 的 DOM 树)。
+- **事件**:输入事件从窗口进入,沿部件树传递;焦点决定键盘输入的去向。
+- **帧循环**:主循环处理事件、更新状态、重绘脏区,并驱动动画与异步任务。
+- **窗口**:窗口是渲染目标,承载一棵部件树,并处理尺寸、DPI 与关闭等系统交互。
+
+## 架构
+
+LCUI 建立在以下库之上:
+
+- [`lib/yutil`](./lib/yutil):通用数据结构与工具。
+- [`lib/pandagl`](./lib/pandagl):字体、文字排版、图片读写与渲染。
+- [`lib/css`](./lib/css):CSS 解析与选择器。
+- [`lib/ptk`](./lib/ptk):跨平台消息循环、窗口、定时器与输入法。
+- [`lib/thread`](./lib/thread):跨平台多线程。
+- [`lib/router`](./lib/router):路由与导航。
+- [`lib/ui`](./lib/ui):组件、事件、样式与绘制。
+- [`lib/ui-xml`](./lib/ui-xml):从 XML 创建界面。
+- [`lib/ui-server`](./lib/ui-server):把组件映射到系统窗口。
+
+核心源码位于 `src/`:`app`、`fonts`、`settings`、`ui`、`widgets`、`worker`。
+
+## 快速开始
+
+### 运行 Hello World
+
+```shell
+git clone https://github.com/lc-soft/LCUI.git
+cd LCUI
+xmake run hello
+```
+
+### 最小程序
+
+```c
+#include
+/* Windows 下提供 WinMain → main 的入口包装 */
+#include
+
+int main(int argc, char **argv)
+{
+ ui_widget_t *text;
+ lcui_window_t *win;
+
+ /**
+ * 构造窗口配置项
+ * title: 窗口标题
+ * id: 窗口状态标识,用于保存/恢复位置与尺寸
+ * width/height: 首次运行时的默认客户区尺寸
+ */
+ lcui_window_options_t opt = {
+ .title = L"Hello",
+ .id = "main",
+ .width = 800,
+ .height = 600,
+ };
+
+ /* 初始化 LCUI 子系统 */
+ lcui_init();
+
+ text = ui_create_widget("text");
+ ui_text_set_content(text, "Hello, LCUI!");
+ /* 把文本挂到根部件,窗口以根部件为内容时才能渲染它 */
+ ui_root_append(text);
+
+ /* 创建窗口并绑定根部件作为内容,此时窗口保持隐藏 */
+ win = lcui_window_create_for_widget(ui_root(), &opt);
+
+ /* 加载配置,恢复上次保存的窗口位置与尺寸 */
+ lcui_load_settings("dev.example.hello");
+
+ /* 显示窗口,窗口将在首帧渲染后显示 */
+ lcui_window_show(win);
+
+ /* 进入主循环,退出时清理 */
+ return lcui_main();
+}
+```
+
+### 浏览全部组件(可选)
+
+`doc-viewer` 展示了全部预置组件、样式和交互效果。构建它需要 Node.js 和 `@lcui/cli`:
+
+```shell
+npm install -g @lcui/cli
+cd examples/doc-viewer
+npm install
+lcui build --skip-xmake
+cd ../..
+xmake run doc-viewer
+```
+
+### 创建新项目
+
+`@lcui/cli` 是 LCUI 的命令行开发工具:负责创建项目骨架、把 TSX/CSS 等资源编译为 C 源码,并配合 xmake 构建应用。
+
+```shell
+npm install -g @lcui/cli
+lcui create my-lcui-app
+```
+
+按命令提示选择模板。
+
+#### 手动配置 xmake
+
+不使用脚手架时,可以直接编写 `xmake.lua`:
+
+```lua
+add_repositories("lcui-repo https://github.com/lcui-dev/xmake-repo.git")
+add_requires("lcui")
+
+target("my-app")
+ set_kind("binary")
+ add_files("src/*.c")
+ add_packages("lcui")
+```
+
+然后运行:
+
+```shell
+xmake run my-app
+```
+
+`lcui` 包是自包含的,不要在同一 target 里再依赖 `pandagl`、`css`、`ptk` 等子库包,否则会出现重复符号。只使用单个子库时,可以改为 `add_requires("pandagl")`。
+
+## 文档与示例
+
+- [在线文档](https://lcui-dev.github.io/docs/next/guides/base/)
+- [内置示例](examples/):`hello`、`todolist`、`fabric`、`doc-viewer`
+- 教程:[图像查看器](https://lcui-dev.github.io/docs/tutorials/kantu)、[待办清单](https://lcui-dev.github.io/docs/tutorials/todolist)、[渲染布料动画](https://lcui-dev.github.io/docs/tutorials/render-fabric)
+- [意见征集稿(RFC)](https://lcui-dev.github.io/docs/next/rfcs/) / [更新日志](CHANGELOG.zh-cn.md) / [贡献指南](.github/CONTRIBUTING.md)
+
+## 从源码构建与测试
+
+```shell
+git clone https://github.com/lc-soft/LCUI.git
+cd LCUI
+xmake build
+xmake test
+```
+
+## 贡献
+
+- 完善 `lib/` 下各库的文档与示例。
+- [反馈问题](https://github.com/lc-soft/LCUI/issues),并在修复后帮助验证。
+- 搜索并解决源码中的 [FIXME](https://github.com/lc-soft/LCUI/search?l=C&q=FIXME) / [TODO](https://github.com/lc-soft/LCUI/search?l=C&q=TODO)。
+- 审查[代码改动](https://github.com/lc-soft/LCUI/pulls)。
+
+本项目采用参与者公约定义的[行为准则](CODE_OF_CONDUCT.zh-cn.md)。
+
+## 常见问题
+
+### 编译报错了
+
+本项目的构建配置加入了“将警告视为错误”编译选项,可能是因为你的编译器比较新,能够从代码中发现更多问题。你可以搜索所有包含 `set_warnings("all", "error")` 的 `xmake.lua` 文件,然后删除这项规则。
+
+### 这是一个浏览器内核吗?或者像 Electron 那样集成了浏览器环境?
+
+不是。可以把它当成一个应用了部分 Web 技术的传统 GUI 开发库。
+
+### 相比其它 GUI 库/框架,为什么选择 LCUI?
+
+建议优先考虑其它 GUI 库/框架,因为 LCUI 目前缺少:
+
+- **组件覆盖仍有限**:已内置常用组件,但复杂或专业控件仍需自行实现。
+- **高效的图形渲染性能**:没有 GPU 加速,界面内容较多且较大时可能卡顿。
+- **动画系统**:界面缺少动效反馈,影响交互体验。
+- **详尽且友好的文档**:现有文档和示例仅供简单了解,深入学习需要阅读源码。
+- **积极的更新**:受限于维护者的个人兴趣和时间,更新频率很低,提交的需求或 BUG 不一定会被解决。
+
+以 LCUI 现有的条件,除了满足维护者的个人需求外,只适用于开发一些界面内容和交互都很简单的小工具。
+
+### 都用上 TypeScript 了,为什么不直接用 Electron?
+
+目前 TypeScript 主要用于描述界面和资源依赖,用到的语言特性较少,不需要深入学习,大多数情况下参考示例代码即可。
+
+如果你有较丰富的 Web 开发经验且愿意学习 Electron,显然 Electron 更合适。
+
+### 建议添加 macOS、Android 支持
+
+这些特性的开发和维护成本较高,暂无相关计划。如果迫切需要,可以尝试自行实现,例如新建 `lcui-macos`、`lcui-android` 项目。
+
+### 我想要某个功能,就像某个项目里的那样
+
+请先[新建 issue](https://github.com/lc-soft/LCUI/issues/new/choose),按模板补全内容,并尽量提供开发思路和参考资料。也可以参考现有的[意见征集稿(RFC)](https://lcui-dev.github.io/docs/next/rfcs/)来撰写。
+
+### 求添加 Python / Go / Rust / C# / Java 语言绑定
+
+LCUI 的命令行工具已经支持将 TypeScript 写的界面配置编译为 C 源文件,虽然不是语言绑定但也够用,因此作者不会再添加其它语言绑定。如果你确实需要,可以自行设计实现。
+
+## 许可
+
+[MIT](http://opensource.org/licenses/MIT)
diff --git a/preview-cn.png b/preview-cn.png
new file mode 100644
index 00000000..5d85a110
Binary files /dev/null and b/preview-cn.png differ
diff --git a/preview-en.png b/preview-en.png
new file mode 100644
index 00000000..2ff26d9f
Binary files /dev/null and b/preview-en.png differ
diff --git a/preview.png b/preview.png
deleted file mode 100644
index 6cea9f14..00000000
Binary files a/preview.png and /dev/null differ