docs: sync api and planning docs
This commit is contained in:
@@ -1,34 +1,30 @@
|
||||
# WindowsInputModule::HandleMessage
|
||||
|
||||
公开方法,详见头文件声明。
|
||||
**命名空间**: `XCEngine::Input::Platform`
|
||||
|
||||
**类型**: `method`
|
||||
|
||||
**头文件**: `XCEngine/Platform/Windows/WindowsInputModule.h`
|
||||
|
||||
## 签名
|
||||
|
||||
```cpp
|
||||
void HandleMessage(size_t hwnd, unsigned int msg, size_t wParam, size_t lParam) override;
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Platform/Windows/WindowsInputModule.h`,当前页面用于固定 `WindowsInputModule` 类目录下的方法级 canonical 路径。
|
||||
## 作用
|
||||
|
||||
**参数:**
|
||||
- `hwnd` - 参数语义详见头文件声明。
|
||||
- `msg` - 参数语义详见头文件声明。
|
||||
- `wParam` - 参数语义详见头文件声明。
|
||||
- `lParam` - 参数语义详见头文件声明。
|
||||
把一条 Win32 窗口消息翻译成引擎输入事件。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
## 当前实现
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Platform/Windows/WindowsInputModule.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Input::Platform::WindowsInputModule object;
|
||||
// 根据上下文补齐参数后调用 WindowsInputModule::HandleMessage(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
- 如果模块尚未初始化,会直接返回。
|
||||
- `msg` 会被分发到键盘、字符输入、鼠标移动、鼠标按键和滚轮等处理函数。
|
||||
- 这些辅助函数最终都转成 `InputManager::Get()` 上的 `ProcessKeyDown`、`ProcessMouseMove`、`ProcessMouseButton`、`ProcessMouseWheel`、`ProcessTextInput` 等调用。
|
||||
- `hwnd` 参数当前未参与分支决策,真正用到的是消息类型和 `wParam` / `lParam`。
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](WindowsInputModule.md)
|
||||
- [返回模块目录](../Windows.md)
|
||||
- [WindowsInputModule](WindowsInputModule.md)
|
||||
- [PumpEvents](PumpEvents.md)
|
||||
- [WindowsWindow::PumpEvents](../WindowsWindow/PumpEvents.md)
|
||||
|
||||
Reference in New Issue
Block a user