EHS/src/io/BaseWindow.cpp
karutoh 1a4a1ecd9c
Some checks failed
Build & Release / Linux-x86_64-Build (push) Successful in 40s
Build & Release / Linux-AARCH64-Build (push) Has been cancelled
First commit.
2024-01-31 22:28:19 -08:00

72 lines
1.2 KiB
C++

#include "ehs/io/BaseWindow.h"
namespace ehs
{
BaseWindow::BaseWindow()
: created(false), focused(false), cursorVisible(true), cursorConstrained(false),
state(WindowState::NONE)
{
}
BaseWindow::BaseWindow(const BaseWindow &win)
: created(false), focused(false), cursorVisible(true), cursorConstrained(false),
state(WindowState::NONE)
{
}
BaseWindow &BaseWindow::operator=(const BaseWindow &win)
{
if (this == &win)
return *this;
created = false;
focused = false;
cursorPos = {};
cursorVisible = true;
cursorConstrained = false;
state = WindowState::NONE;
ih = {};
return *this;
}
bool BaseWindow::IsCreated() const
{
return created;
}
bool BaseWindow::Poll()
{
return true;
}
bool BaseWindow::HasFocus() const
{
return focused;
}
Vec2_s32 BaseWindow::GetCursorPos() const
{
return cursorPos;
}
bool BaseWindow::IsCursorVisible() const
{
return cursorVisible;
}
bool BaseWindow::IsCursorConstrained() const
{
return cursorConstrained;
}
WindowState BaseWindow::GetState() const
{
return state;
}
const InputHandler* BaseWindow::GetInputHandler() const
{
return &ih;
}
}