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 <cstddef>
7#include <string>
8
9#include "absl/status/statusor.h"
10#include "absl/strings/string_view.h"
11#include "imgui/imgui.h"
12
13namespace yaze {
14namespace editor {
15class WindowHost;
16}
17namespace test {
18
19enum class HarnessTestStatus;
20struct HarnessTestExecution;
21
22namespace internal {
23
24// Empty selects Cancel. Nonempty destinations must be new absolute .yaze paths.
25absl::Status ValidateProjectSaveAsDestination(const char* destination);
26
27// Use a registered base ID in the active session, never a guessed ImGui label.
28absl::StatusOr<std::string> FocusHarnessWindow(editor::WindowHost* host,
29 size_t session_id,
30 absl::string_view window_id);
31// Call after a UI frame: dispatching focus alone does not prove tab selection.
32absl::Status VerifyHarnessWindowFocus(absl::string_view window_name);
33
34struct ParsedTarget {
35 std::string type;
36 std::string label;
37};
38
39struct ResolvedWidgetSelector {
40 ParsedTarget target;
41 std::string resolved_widget_key;
42 std::string resolved_path;
43 ImGuiID imgui_id = 0;
44};
45
46// Resolve a stable registry key to both its descriptive metadata and exact
47// ImGui identifier. Keeping the identifier is what makes duplicate labels
48// safe for harness actions.
49absl::StatusOr<ResolvedWidgetSelector> ResolveWidgetSelector(
50 absl::string_view target, absl::string_view widget_key);
51
52// Replay RPC responses describe queue acceptance, while the execution record
53// describes the terminal action result. Always let the latter win.
54void ApplyTerminalHarnessExecution(const HarnessTestExecution& execution,
55 bool* step_success,
56 std::string* step_message);
57
58} // namespace internal
59} // namespace test
60} // namespace yaze
61
62#endif // YAZE_WITH_GRPC
63#endif // YAZE_APP_SERVICE_IMGUI_TEST_HARNESS_INTERNAL_H_
Room transition destination.
Definition zelda.h:448