Thin app runtime and generic node shells
This commit is contained in:
34
src/app.cpp
34
src/app.cpp
@@ -14,10 +14,9 @@
|
||||
#include "app_core/document_cloud.h"
|
||||
#include "app_core/document_recording.h"
|
||||
#include "app_core/document_route.h"
|
||||
#include "app_core/document_session.h"
|
||||
#include "legacy_app_runtime_shell_services.h"
|
||||
#include "legacy_app_startup_services.h"
|
||||
#include "legacy_document_open_services.h"
|
||||
#include "legacy_document_session_services.h"
|
||||
#include "legacy_preference_storage.h"
|
||||
#include "platform_api/platform_services.h"
|
||||
|
||||
@@ -40,18 +39,7 @@ void App::open_document(std::string path)
|
||||
|
||||
bool App::request_close()
|
||||
{
|
||||
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(
|
||||
*this,
|
||||
close_decision,
|
||||
dialog_already_opened);
|
||||
if (!status.ok())
|
||||
LOG("Close request action failed: %s", status.message);
|
||||
|
||||
return close_decision == pp::app::CloseRequestDecision::close_now;
|
||||
return pp::panopainter::execute_legacy_app_request_close(*this);
|
||||
}
|
||||
|
||||
void App::initAssets()
|
||||
@@ -81,45 +69,45 @@ bool App::update_ui_observer(Node *n)
|
||||
|
||||
void App::renderdoc_frame_start()
|
||||
{
|
||||
begin_render_capture_frame();
|
||||
pp::panopainter::execute_legacy_app_renderdoc_frame_start(*this);
|
||||
}
|
||||
|
||||
void App::renderdoc_frame_end()
|
||||
{
|
||||
end_render_capture_frame();
|
||||
pp::panopainter::execute_legacy_app_renderdoc_frame_end(*this);
|
||||
}
|
||||
|
||||
void App::render_thread_main()
|
||||
{
|
||||
runtime_.render_thread_main(*this, {});
|
||||
pp::panopainter::execute_legacy_app_render_thread_main(*this);
|
||||
}
|
||||
|
||||
void App::ui_thread_tick()
|
||||
{
|
||||
runtime_.ui_thread_tick(*this);
|
||||
pp::panopainter::execute_legacy_app_ui_thread_tick(*this);
|
||||
}
|
||||
|
||||
void App::ui_thread_main()
|
||||
{
|
||||
runtime_.ui_thread_main(*this, {});
|
||||
pp::panopainter::execute_legacy_app_ui_thread_main(*this);
|
||||
}
|
||||
|
||||
void App::render_thread_start()
|
||||
{
|
||||
runtime_.render_thread_start(*this);
|
||||
pp::panopainter::execute_legacy_app_render_thread_start(*this);
|
||||
}
|
||||
|
||||
void App::render_thread_stop()
|
||||
{
|
||||
runtime_.render_thread_stop();
|
||||
pp::panopainter::execute_legacy_app_render_thread_stop(*this);
|
||||
}
|
||||
|
||||
void App::ui_thread_start()
|
||||
{
|
||||
runtime_.ui_thread_start(*this);
|
||||
pp::panopainter::execute_legacy_app_ui_thread_start(*this);
|
||||
}
|
||||
|
||||
void App::ui_thread_stop()
|
||||
{
|
||||
runtime_.ui_thread_stop();
|
||||
pp::panopainter::execute_legacy_app_ui_thread_stop(*this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user