Refine editor host boundary

This commit is contained in:
2026-04-27 22:21:40 +08:00
parent 9428fec350
commit 520413fa0d
82 changed files with 119 additions and 106 deletions

View File

@@ -0,0 +1,69 @@
#pragma once
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include "Windowing/EditorWindowTransferRequests.h"
#include <windows.h>
namespace XCEngine::UI::Editor::App {
class EditorWindow;
class EditorWindowHostCoordinator;
class EditorWindowMessageDispatcher final {
public:
static bool TryDispatch(
HWND hwnd,
EditorWindowHostCoordinator& hostCoordinator,
EditorWindow& window,
UINT message,
WPARAM wParam,
LPARAM lParam,
LRESULT& outResult);
private:
struct DispatchContext;
static void FinalizeImmediateFrame(
const DispatchContext& context,
const EditorWindowFrameTransferRequests& transferRequests);
static void FlushQueuedCompletedImmediateFrame(const DispatchContext& context);
static void RenderAndHandleWindowFrame(const DispatchContext& context);
static void DispatchWindowFrameTransferRequests(
const DispatchContext& context,
const EditorWindowFrameTransferRequests& transferRequests);
static bool EnsureTrackingMouseLeave(const DispatchContext& context);
static bool TryHandleChromeHoverConsumption(
const DispatchContext& context,
LPARAM lParam,
LRESULT& outResult);
static bool TryDispatchWindowPointerMessage(
const DispatchContext& context,
UINT message,
WPARAM wParam,
LPARAM lParam,
LRESULT& outResult);
static bool TryDispatchWindowInputMessage(
const DispatchContext& context,
UINT message,
WPARAM wParam,
LPARAM lParam,
LRESULT& outResult);
static bool TryDispatchWindowLifecycleMessage(
const DispatchContext& context,
UINT message,
WPARAM wParam,
LPARAM lParam,
LRESULT& outResult);
static bool TryDispatchWindowChromeMessage(
const DispatchContext& context,
UINT message,
WPARAM wParam,
LPARAM lParam,
LRESULT& outResult);
};
} // namespace XCEngine::UI::Editor::App