Refine editor host boundary
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user