Rename Display to Window.
It makes more sense to be consistent and always call it window.
This commit is contained in:
parent
416a71f744
commit
24da7f45e0
33 changed files with 257 additions and 255 deletions
39
source/Platform/PlatformWindow.cpp
Normal file
39
source/Platform/PlatformWindow.cpp
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue