关键节点

This commit is contained in:
2026-04-25 16:46:01 +08:00
parent 6002d86a7e
commit ef41c44464
516 changed files with 6175 additions and 12401 deletions

View File

@@ -0,0 +1,42 @@
#pragma once
#include <cstdint>
namespace XCEngine::UI::Editor::App {
enum class EditorWindowPointerCaptureOwner : std::uint8_t {
None = 0,
Shell,
HostedContent,
BorderlessResize,
BorderlessChrome,
GlobalTabDrag,
};
constexpr bool CanRouteEditorWindowGlobalTabDragPointerMessages(
EditorWindowPointerCaptureOwner owner,
bool ownsActiveGlobalTabDrag) {
return ownsActiveGlobalTabDrag &&
owner == EditorWindowPointerCaptureOwner::GlobalTabDrag;
}
constexpr bool CanRouteEditorWindowBorderlessResizePointerMessages(
EditorWindowPointerCaptureOwner owner) {
return owner == EditorWindowPointerCaptureOwner::BorderlessResize;
}
constexpr bool CanRouteEditorWindowBorderlessChromePointerMessages(
EditorWindowPointerCaptureOwner owner) {
return owner == EditorWindowPointerCaptureOwner::BorderlessChrome;
}
constexpr bool CanConsumeEditorWindowChromeHover(
EditorWindowPointerCaptureOwner owner,
bool shellInteractiveCaptureActive,
bool hostedContentCaptureActive) {
return owner == EditorWindowPointerCaptureOwner::None &&
!shellInteractiveCaptureActive &&
!hostedContentCaptureActive;
}
} // namespace XCEngine::UI::Editor::App