Files
XCEngine/engine/include/XCEngine/Platform/IWindow.h
ssdfasd d575532966 docs: update TEST_SPEC.md and README.md to reflect new directory structure
- TEST_SPEC.md: Updated test directory structure to reflect Core/Asset,
  Core/IO, and Resources/<Type> subdirectories
- TEST_SPEC.md: Updated module names and test counts (852 total)
- TEST_SPEC.md: Updated build commands for new Resources subdirectories
- README.md: Updated engine structure with Core/Asset/ and Core/IO/
- README.md: Updated Resources section with layered architecture
- README.md: Updated test coverage table with accurate counts
2026-03-24 16:14:05 +08:00

43 lines
1.2 KiB
C++

#pragma once
#include "PlatformTypes.h"
#include <functional>
namespace XCEngine {
namespace Platform {
class IWindow {
public:
virtual ~IWindow() = default;
virtual bool Create(const WindowDesc& desc) = 0;
virtual void Destroy() = 0;
virtual bool IsValid() const = 0;
virtual WindowHandle GetNativeHandle() const = 0;
virtual void PumpEvents() = 0;
virtual void SetTitle(const Containers::String& title) = 0;
virtual void SetFullscreen(bool fullscreen) = 0;
virtual bool IsFullscreen() const = 0;
virtual void Minimize() = 0;
virtual void Maximize() = 0;
virtual void Restore() = 0;
virtual void SetVSync(bool enabled) = 0;
virtual bool IsVSync() const = 0;
virtual Core::uint32_t GetWidth() const = 0;
virtual Core::uint32_t GetHeight() const = 0;
virtual bool ShouldClose() const = 0;
virtual void SetShouldClose(bool shouldClose) = 0;
using CloseCallback = std::function<void()>;
using ResizeCallback = std::function<void(Core::uint32_t, Core::uint32_t)>;
virtual void SetCloseCallback(CloseCallback callback) = 0;
virtual void SetResizeCallback(ResizeCallback callback) = 0;
};
} // namespace Platform
} // namespace XCEngine