MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / OpenUri

Method OpenUri

TranslucentTB/uwp/uwp.cpp:103–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103winrt::fire_and_forget UWP::OpenUri(const wf::Uri &uri)
104{
105 bool opened;
106 try
107 {
108 opened = co_await winrt::Windows::System::Launcher::LaunchUriAsync(uri);
109 }
110 catch (const winrt::hresult_error &err)
111 {
112 HresultErrorHandle(err, spdlog::level::err, L"Failed to launch uri.");
113 co_return;
114 }
115
116 if (!opened)
117 {
118 MessagePrint(spdlog::level::err, L"Uri was not launched.");
119 }
120}
121
122Window UWP::GetCoreWindow()
123{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected