InputProcessor allows a plugin to propagate input events to Anbox which will forward them to the Android container and influence behavior of input device in Android.
More...
#include <input_processor.h>
InputProcessor allows a plugin to propagate input events to Anbox which will forward them to the Android container and influence behavior of input device in Android.
Definition at line 30 of file input_processor.h.
◆ InputProcessor() [1/2]
anbox::InputProcessor::InputProcessor |
( |
| ) |
|
|
default |
◆ ~InputProcessor()
virtual anbox::InputProcessor::~InputProcessor |
( |
| ) |
|
|
virtualdefault |
◆ InputProcessor() [2/2]
◆ inject_event()
Inject an input event into AnboxPlatform.
This function allows injecting an InputEvent into the platform and letting the InputProcessor handle the input events.
- Parameters
-
event | an event to be pushed into the internal queue. |
- Returns
- 0 on success, otherwise returns EINVAL on error occurs.
- Note
- This function is only used in our test suite to facilitate our automation tests and it is subject to change at any time.
◆ operator=()
◆ read_event()
virtual int anbox::InputProcessor::read_event |
( |
AnboxInputEvent * |
event, |
|
|
int |
timeout |
|
) |
| |
|
pure virtual |
Read next available input event.
Anbox will call read_event() to query the plugin for the next available input event which is then forwarded to the Android container. If no input event is available and timeout is set to -1, the function must block until the next event is available.
- Parameters
-
event | Pointer to the available event to be sent to the anbox container. |
timeout | maximum number of milliseconds to wait for the next available event. The following possible values for timeout must be handled:
timeout | Behavior |
0 | Non-blocking mode; return -EIO immediately if no event to process. |
< 0 | Block indefinitely until an event is available. |
> 0 | Wait up to a maximum of timeout milliseconds for an event. |
|
- Returns
- 0 on success otherwise returns EINVAL on error occurs.
The documentation for this class was generated from the following file: