Optional automation surface of an editor, so tooling (the pulp control UI tools, tests) can see and drive any editor whatever draws it.
More...
#include <editor_host.hpp>
|
| virtual | ~EditorAutomation ()=default |
| virtual bool | capture_png (std::vector< std::uint8_t > &) |
| | Encode the editor's current frame as PNG into png.
|
| virtual bool | inject_input (std::string_view, std::string &error) |
| | Apply one synthetic input request (a click, drag, key or text entry described as JSON).
|
| virtual bool | observe (std::string_view, std::string &) |
| | Answer an observation query (for example the element tree, or one element's state) with a JSON snapshot in reply_json.
|
Optional automation surface of an editor, so tooling (the pulp control UI tools, tests) can see and drive any editor whatever draws it.
Requests and replies are JSON text. Each member reports false when the editor does not support it. Main thread.
◆ ~EditorAutomation()
| virtual pulp::format::EditorAutomation::~EditorAutomation |
( |
| ) |
|
|
virtualdefault |
◆ capture_png()
| virtual bool pulp::format::EditorAutomation::capture_png |
( |
std::vector< std::uint8_t > & | | ) |
|
|
inlinevirtual |
Encode the editor's current frame as PNG into png.
◆ inject_input()
| virtual bool pulp::format::EditorAutomation::inject_input |
( |
std::string_view | , |
|
|
std::string & | error ) |
|
inlinevirtual |
Apply one synthetic input request (a click, drag, key or text entry described as JSON).
On failure error says why.
◆ observe()
| virtual bool pulp::format::EditorAutomation::observe |
( |
std::string_view | , |
|
|
std::string & | ) |
|
inlinevirtual |
Answer an observation query (for example the element tree, or one element's state) with a JSON snapshot in reply_json.
The documentation for this class was generated from the following file:
- /home/runner/work/pulp/pulp/core/format/include/pulp/format/editor_host.hpp