refactor(new_editor): tighten app dependency boundaries

This commit is contained in:
2026-04-19 02:48:41 +08:00
parent 7429f22fb1
commit c59cd83c38
86 changed files with 1754 additions and 1077 deletions

View File

@@ -0,0 +1,73 @@
#pragma once
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include "Composition/EditorShellRuntime.h"
#include "Platform/Win32/EditorWindowPointerCapture.h"
#include <Platform/Win32/BorderlessWindowChrome.h>
#include <Platform/Win32/HostRuntimeState.h>
#include <Platform/Win32/InputModifierTracker.h>
#include <Rendering/D3D12/D3D12WindowRenderLoop.h>
#include <Rendering/D3D12/D3D12WindowRenderer.h>
#include <Rendering/Native/AutoScreenshot.h>
#include <Rendering/Native/NativeRenderer.h>
#include <XCEditor/Workspace/UIEditorWorkspaceController.h>
#include <XCEngine/UI/Types.h>
#include <windows.h>
#include <string>
#include <vector>
namespace XCEngine::UI::Editor::App {
struct EditorWindowWindowState {
HWND hwnd = nullptr;
std::string windowId = {};
std::wstring title = {};
std::string titleText = {};
bool primary = false;
bool closing = false;
};
struct EditorWindowRenderState {
Host::NativeRenderer renderer = {};
Host::D3D12WindowRenderer windowRenderer = {};
Host::D3D12WindowRenderLoop windowRenderLoop = {};
Host::AutoScreenshotController autoScreenshot = {};
::XCEngine::UI::UITextureHandle titleBarLogoIcon = {};
bool ready = false;
};
struct EditorWindowInputState {
Host::InputModifierTracker modifierTracker = {};
std::vector<::XCEngine::UI::UIInputEvent> pendingEvents = {};
bool trackingMouseLeave = false;
EditorWindowPointerCaptureOwner pointerCaptureOwner =
EditorWindowPointerCaptureOwner::None;
};
struct EditorWindowCompositionState {
UIEditorWorkspaceController workspaceController = {};
EditorShellRuntime shellRuntime = {};
};
struct EditorWindowChromeRuntimeState {
Host::BorderlessWindowChromeState chromeState = {};
Host::HostRuntimeState runtime = {};
};
struct EditorWindowState {
EditorWindowWindowState window = {};
EditorWindowRenderState render = {};
EditorWindowInputState input = {};
EditorWindowCompositionState composition = {};
EditorWindowChromeRuntimeState chrome = {};
};
} // namespace XCEngine::UI::Editor::App