73 lines
1.7 KiB
C++
73 lines
1.7 KiB
C++
#pragma once
|
|
|
|
#include "FramePriority.h"
|
|
#include "WindowCaptureDemand.h"
|
|
#include "WindowCursorType.h"
|
|
#include "WindowId.h"
|
|
#include "WindowType.h"
|
|
#include "WindowTitleBarMode.h"
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
namespace XCEngine::UI::Editor::Windowing::Domain {
|
|
|
|
enum class WindowLifecycleState : std::uint8_t {
|
|
PendingCreate = 0,
|
|
NativeAttached,
|
|
Initializing,
|
|
Running,
|
|
Closing,
|
|
Destroyed,
|
|
};
|
|
|
|
struct WindowIdentityState {
|
|
WindowId windowId = {};
|
|
WindowType windowType = WindowType::Unknown;
|
|
};
|
|
|
|
struct WindowPresentationState {
|
|
std::wstring title = {};
|
|
float dpiScale = 1.0f;
|
|
bool focused = false;
|
|
bool visible = false;
|
|
bool minimized = false;
|
|
};
|
|
|
|
struct WindowSizeState {
|
|
std::uint32_t clientPixelWidth = 0u;
|
|
std::uint32_t clientPixelHeight = 0u;
|
|
std::uint32_t predictedClientPixelWidth = 0u;
|
|
std::uint32_t predictedClientPixelHeight = 0u;
|
|
};
|
|
|
|
struct WindowChromeState {
|
|
bool interactiveResize = false;
|
|
};
|
|
|
|
struct WindowFrameState {
|
|
bool needsFrame = false;
|
|
FramePriority priority = FramePriority::Normal;
|
|
std::uint64_t frameSerial = 0u;
|
|
std::uint64_t resizeEpoch = 0u;
|
|
};
|
|
|
|
struct WindowContentState {
|
|
WindowCursorType cursorType = WindowCursorType::Arrow;
|
|
WindowCaptureDemand captureDemand = {};
|
|
WindowTitleBarMode titleBarMode = WindowTitleBarMode::SystemChrome;
|
|
std::string statusText = {};
|
|
};
|
|
|
|
struct WindowState {
|
|
WindowIdentityState identity = {};
|
|
WindowLifecycleState lifecycle = WindowLifecycleState::PendingCreate;
|
|
WindowPresentationState presentation = {};
|
|
WindowSizeState size = {};
|
|
WindowChromeState chrome = {};
|
|
WindowFrameState frame = {};
|
|
WindowContentState content = {};
|
|
};
|
|
|
|
} // namespace XCEngine::UI::Editor::Windowing::Domain
|