1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00
xn65/inc/xna/game/window.hpp

60 lines
1.5 KiB
C++
Raw Normal View History

2024-03-18 15:41:46 -03:00
#ifndef XNA_GAME_WINDOW_HPP
#define XNA_GAME_WINDOW_HPP
2024-05-24 12:31:24 -03:00
#include "../default.hpp"
2024-05-18 16:22:00 -03:00
#include "../common/numerics.hpp"
2024-07-29 22:03:25 -03:00
#include "../csharp/screen.hpp"
2024-03-18 15:41:46 -03:00
namespace xna {
2024-05-24 12:31:24 -03:00
class GameWindow {
2024-03-18 15:41:46 -03:00
public:
2024-05-24 12:31:24 -03:00
GameWindow();
2024-07-30 15:29:58 -03:00
//Gets the current display orientation, which reflects the physical orientation of the phone in the user's hand.
constexpr DisplayOrientation CurrentOrientation() const {
return currentOrientation;
}
//Gets and sets the title of the system window.
constexpr String Title() const {
return title;
}
//Gets and sets the title of the system window.
void Title(String const& value);
//Gets the handle to the system window.
constexpr intptr_t Handle() const {
return handle;
}
//The screen dimensions of the game window's client rectangle.
constexpr Rectangle ClientBounds() const {
return clientBounds;
}
//Gets the device name of the screen the window is currently in.
String ScreenDeviceName() const;
2024-07-29 22:03:25 -03:00
2024-07-30 09:41:31 -03:00
static uptr<Screen> ScreenFromAdapter(GraphicsAdapter const& adapter);
static uptr<Screen> ScreenFromHandle(intptr_t windowHandle);
2024-07-30 15:29:58 -03:00
bool IsWindowMinimized() const;
inline static constexpr Int DefaultClientWidth = 800;
inline static constexpr Int DefaultClientHeight = 600;
private:
String title;
intptr_t handle{ 0 };
Rectangle clientBounds{};
String screenDeviceName;
DisplayOrientation currentOrientation{ DisplayOrientation::Default };
2024-03-18 15:41:46 -03:00
2024-05-24 12:31:24 -03:00
public:
struct PlatformImplementation;
uptr<PlatformImplementation> impl = nullptr;
2024-03-18 15:41:46 -03:00
};
}
#endif