Repository navigation
v2.0.0 GTK4 Compatibility
What's Changed
- Fix/linux fixes by @5cript in #150
- Added more api wrappers. by @5cript in #151
- Feat/gtk4 by @5cript in #152
BREAKING CHANGE:
- Window positioning and self positioning functions are knowingly broken in newer versions using webkitgtk-6.0+ and GTK4. Applications are not supposed to self position under Wayland, that is the compositors job.
Full Changelog: v1.3.1...v2.0.0
Also adds support for Startup sync via RPC:
Nui::RpcClient::awaitRpcAvailable(
[](bool timeout)
{
if (timeout)
{
// Show load failure in dom body:
dom = std::make_unique<Nui::Dom::Dom>();
dom->setBody(
Nui::Elements::body{}(Nui::Elements::div{
Nui::Attributes::style = "color: red; font-size: 20px; text-align: center; margin-top: 20px;"
}("Failed to load application: RPC initialization timed out. Restart the application."))
);
return;
}
dom->setBody(Nui::Elements::body{}(Nui::Elements::div{
Nui::Attributes::style = "color: lime font-size: 20px; text-align: center; margin-top: 20px;"
}("Ready"));
},
std::chrono::seconds(10)Backend:
MyClass::MyClass()
: window_{
Nui::WindowOptions{
.title = "NuiScp"s,
.debug = true,
.customSchemes = {createFolderMapping(programDir_, "nui")},
.onRpcAliveMessage = [this]() {
// Register RPCs here:
myApi.registerRpc();
hub_.markRpcAsInitialized();
}
},
}
{}