Inject synthetic device input into the live platform event stream. @thread Owner game-loop / MCP poll thread only. @reentrancy Does not invoke scripts or unknown callbacks. @ownership Implementations are owned by the providing module; callers must not retain the pointer across frames or capability revoke.
更多...
#include <InputInjection.h>
Inject synthetic device input into the live platform event stream. @thread Owner game-loop / MCP poll thread only. @reentrancy Does not invoke scripts or unknown callbacks. @ownership Implementations are owned by the providing module; callers must not retain the pointer across frames or capability revoke.
在文件 InputInjection.h 第 28 行定义.
◆ ~IInputInjection()
| virtual eve::IInputInjection::~IInputInjection |
( |
| ) |
|
|
virtualdefault |
◆ injectKey()
| virtual Result< void > eve::IInputInjection::injectKey |
( |
std::string_view |
key, |
|
|
bool |
down, |
|
|
bool |
repeat = false |
|
) |
| |
|
pure virtual |
Queue a key press or release.
- 参数
-
| key | SDL key name (e.g. "A", "Return", "Left Ctrl"). |
| down | True for keydown, false for keyup. |
| repeat | Whether the keydown is a repeat event. |
- 返回
- Success, or ParseError / Unsupported / Failed with diagnostics.
◆ injectMouseButton()
| virtual Result< void > eve::IInputInjection::injectMouseButton |
( |
int |
button, |
|
|
bool |
down, |
|
|
float |
x, |
|
|
float |
y |
|
) |
| |
|
pure virtual |
Queue a mouse button press or release at a window position.
- 参数
-
| button | SDL button index (1=left, 2=middle, 3=right). |
| down | True for button down, false for button up. |
| x | Window X in logical pixels. |
| y | Window Y in logical pixels. |
◆ injectMouseMove()
| virtual Result< void > eve::IInputInjection::injectMouseMove |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
dx = 0.f, |
|
|
float |
dy = 0.f |
|
) |
| |
|
pure virtual |
Queue absolute mouse motion (and optional relative deltas).
- 参数
-
| x | Window X in logical pixels. |
| y | Window Y in logical pixels. |
| dx | Relative X delta reported to relative-mode consumers. |
| dy | Relative Y delta reported to relative-mode consumers. |
◆ injectText()
| virtual Result< void > eve::IInputInjection::injectText |
( |
std::string_view |
text | ) |
|
|
pure virtual |
Queue a UTF-8 text input event (IME / text fields).
- 参数
-
| text | Non-empty UTF-8 payload; truncated by the provider if needed. |
◆ injectWheel()
| virtual Result< void > eve::IInputInjection::injectWheel |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
pure virtual |
Queue a mouse wheel tick.
- 参数
-
| x | Horizontal scroll amount (SDL wheel units). |
| y | Vertical scroll amount (SDL wheel units). |
◆ capabilityName
| constexpr const char* eve::IInputInjection::capabilityName = "IInputInjection" |
|
staticconstexpr |
该类的文档由以下文件生成: