Thin app runtime and generic node shells
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
#include "pch.h"
|
||||
|
||||
#include "legacy_app_runtime_shell_services.h"
|
||||
|
||||
#include "app.h"
|
||||
#include "app_core/app_frame.h"
|
||||
#include "app_core/app_shutdown.h"
|
||||
#include "app_core/app_status.h"
|
||||
#include "app_core/document_session.h"
|
||||
#include "legacy_document_session_services.h"
|
||||
#include "legacy_recording_services.h"
|
||||
#include "legacy_ui_gl_dispatch.h"
|
||||
#include "renderer_gl/opengl_capabilities.h"
|
||||
@@ -41,6 +45,67 @@ void update_legacy_recording_frame_label(App& app);
|
||||
bool update_legacy_app_ui_observer(App& app, Node* n);
|
||||
void watch_legacy_app_ui_children(App& app, const std::function<bool(Node*)>& observer, bool skip_first_main_child);
|
||||
void update_legacy_canvas_toolbar(App& app);
|
||||
|
||||
bool execute_legacy_app_request_close(App& app)
|
||||
{
|
||||
static bool dialog_already_opened = false;
|
||||
const auto close_decision = pp::app::plan_close_request(
|
||||
Canvas::I->m_unsaved,
|
||||
dialog_already_opened);
|
||||
const auto status = pp::panopainter::execute_legacy_close_request_decision(
|
||||
app,
|
||||
close_decision,
|
||||
dialog_already_opened);
|
||||
if (!status.ok())
|
||||
LOG("Close request action failed: %s", status.message);
|
||||
|
||||
return close_decision == pp::app::CloseRequestDecision::close_now;
|
||||
}
|
||||
|
||||
void execute_legacy_app_renderdoc_frame_start(App& app)
|
||||
{
|
||||
app.begin_render_capture_frame();
|
||||
}
|
||||
|
||||
void execute_legacy_app_renderdoc_frame_end(App& app)
|
||||
{
|
||||
app.end_render_capture_frame();
|
||||
}
|
||||
|
||||
void execute_legacy_app_render_thread_main(App& app)
|
||||
{
|
||||
app.runtime().render_thread_main(app, {});
|
||||
}
|
||||
|
||||
void execute_legacy_app_render_thread_start(App& app)
|
||||
{
|
||||
app.runtime().render_thread_start(app);
|
||||
}
|
||||
|
||||
void execute_legacy_app_render_thread_stop(App& app)
|
||||
{
|
||||
app.runtime().render_thread_stop();
|
||||
}
|
||||
|
||||
void execute_legacy_app_ui_thread_tick(App& app)
|
||||
{
|
||||
app.runtime().ui_thread_tick(app);
|
||||
}
|
||||
|
||||
void execute_legacy_app_ui_thread_main(App& app)
|
||||
{
|
||||
app.runtime().ui_thread_main(app, {});
|
||||
}
|
||||
|
||||
void execute_legacy_app_ui_thread_start(App& app)
|
||||
{
|
||||
app.runtime().ui_thread_start(app);
|
||||
}
|
||||
|
||||
void execute_legacy_app_ui_thread_stop(App& app)
|
||||
{
|
||||
app.runtime().ui_thread_stop();
|
||||
}
|
||||
} // namespace pp::panopainter
|
||||
|
||||
void App::draw(float dt)
|
||||
|
||||
Reference in New Issue
Block a user