Files
XCEngine/docs/api/XCEngine/Platform/IPlatform/CreateWindow.md

32 lines
740 B
Markdown
Raw Normal View History

2026-03-26 16:45:24 +08:00
# IPlatform::CreateWindow
创建新对象或资源。
```cpp
virtual std::unique_ptr<IWindow> CreateWindow(const WindowDesc& desc) = 0;
```
该方法声明于 `XCEngine/Platform/IPlatform.h`,当前页面用于固定 `IPlatform` 类目录下的方法级 canonical 路径。
**参数:**
- `desc` - 参数语义详见头文件声明。
**返回:** `std::unique_ptr<IWindow>` - 返回值语义详见头文件声明。
**示例:**
```cpp
#include <XCEngine/Platform/IPlatform.h>
void Example() {
XCEngine::Platform::IPlatform object;
// 根据上下文补齐参数后调用 IPlatform::CreateWindow(...)。
(void)object;
}
```
## 相关文档
- [返回类总览](IPlatform.md)
- [返回模块目录](../Platform.md)