43 lines
1.2 KiB
C
43 lines
1.2 KiB
C
|
|
#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
|