1
0
Fork 0

Rename Display to Window.

It makes more sense to be consistent and always call it window.
This commit is contained in:
Henrik Hautakoski 2023-08-22 07:12:47 +02:00
parent 416a71f744
commit 24da7f45e0
33 changed files with 257 additions and 255 deletions

View file

@ -0,0 +1,39 @@
#include <Spectre/Window/Window.h>
#include "PlatformWindow.h"
#ifdef SPECTRE_PLATFORM_WIN
#include <Platform/Win32/Win32Window.h>
typedef sp::Win32Window WindowType;
#elif SPECTRE_PLATFORM_UNIX
#include <Platform/Unix/X11Window.h>
typedef sp::X11Window WindowType;
#else
#error "No Window implementation exists"
#endif
namespace sp {
PlatformWindow* PlatformWindow::make(Window* parent)
{
WindowType* disp = new WindowType();
disp->m_parent = parent;
return disp;
}
PlatformWindow::PlatformWindow()
{
}
PlatformWindow::~PlatformWindow()
{
// Nothing to do.
}
void PlatformWindow::onReshape(int width, int height)
{
// Forward to parent.
m_parent->onReshape(width, height);
}
} // namespace sp