MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / GetMatchingWindow

Method GetMatchingWindow

plugins/base/macro-action-window.cpp:43–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41#endif // _WIN32
42
43std::optional<std::string> MacroActionWindow::GetMatchingWindow() const
44{
45 const auto windows = GetWindows();
46
47 if (!_regex.Enabled()) {
48 for (const auto &info : windows) {
49 if (info.title == std::string(_window)) {
50 return info.title;
51 }
52 }
53 return {};
54 }
55
56 for (const auto &info : windows) {
57 if (_regex.Matches(info.title, _window)) {
58 return info.title;
59 }
60 }
61
62 return {};
63}
64
65bool MacroActionWindow::PerformAction()
66{

Callers

nothing calls this directly

Calls 3

GetWindowsFunction · 0.50
EnabledMethod · 0.45
MatchesMethod · 0.45

Tested by

no test coverage detected