1
0
Fork 0
spectre/source/Platform/PlatformWindow.cpp
Henrik Hautakoski 24da7f45e0 Rename Display to Window.
It makes more sense to be consistent and always call it window.
2023-08-22 07:12:47 +02:00

39 lines
708 B
C++

#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