yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
imgui_test_harness_internal.h
Go to the documentation of this file.
1#ifndef YAZE_APP_SERVICE_IMGUI_TEST_HARNESS_INTERNAL_H_
2#define YAZE_APP_SERVICE_IMGUI_TEST_HARNESS_INTERNAL_H_
3
4#ifdef YAZE_WITH_GRPC
5
6#include <string>
7
8#include "absl/status/statusor.h"
9#include "absl/strings/string_view.h"
10#include "imgui/imgui.h"
11
12namespace yaze {
13namespace test {
14
15enum class HarnessTestStatus;
16struct HarnessTestExecution;
17
18namespace internal {
19
20struct ParsedTarget {
21 std::string type;
22 std::string label;
23};
24
25struct ResolvedWidgetSelector {
26 ParsedTarget target;
27 std::string resolved_widget_key;
28 std::string resolved_path;
29 ImGuiID imgui_id = 0;
30};
31
32// Resolve a stable registry key to both its descriptive metadata and exact
33// ImGui identifier. Keeping the identifier is what makes duplicate labels
34// safe for harness actions.
35absl::StatusOr<ResolvedWidgetSelector> ResolveWidgetSelector(
36 absl::string_view target, absl::string_view widget_key);
37
38// Replay RPC responses describe queue acceptance, while the execution record
39// describes the terminal action result. Always let the latter win.
40void ApplyTerminalHarnessExecution(const HarnessTestExecution& execution,
41 bool* step_success,
42 std::string* step_message);
43
44} // namespace internal
45} // namespace test
46} // namespace yaze
47
48#endif // YAZE_WITH_GRPC
49#endif // YAZE_APP_SERVICE_IMGUI_TEST_HARNESS_INTERNAL_H_