[studio,turbine] Add support for window icons
Some checks are pending
Build / build (push) Waiting to run

This commit is contained in:
2025-04-11 21:37:22 -05:00
parent 5ca7e2f226
commit a521887ddd
9 changed files with 149 additions and 30 deletions

View File

@ -32,11 +32,15 @@ static void keyEventHandler(turbine::Context &ctx, turbine::Key key, bool down)
sctx->ui.handleKeyEvent(key, down);
}
[[nodiscard]]
ox::SpanView<uint8_t> WindowIcon() noexcept;
static ox::Error runApp(
ox::StringViewCR appName,
ox::StringViewCR projectDataDir,
ox::UPtr<ox::FileSystem> &&fs) noexcept {
OX_REQUIRE_M(ctx, turbine::init(std::move(fs), appName));
oxLogError(turbine::setWindowIcon(*ctx, WindowIcon()));
turbine::setWindowTitle(*ctx, keelCtx(*ctx).appName);
turbine::setKeyEventHandler(*ctx, keyEventHandler);
turbine::setRefreshWithin(*ctx, 0);