Platform/PlatformApplication: Adding createWindow()
This commit is contained in:
parent
2ac3b5b8cc
commit
a8f65e54ac
5 changed files with 17 additions and 6 deletions
|
|
@ -7,6 +7,9 @@
|
|||
|
||||
namespace sp {
|
||||
|
||||
class Window;
|
||||
|
||||
class PlatformWindow;
|
||||
class PlatformInput;
|
||||
class PlatformDisplay;
|
||||
|
||||
|
|
@ -19,7 +22,7 @@ public :
|
|||
|
||||
virtual void shutdown() = 0;
|
||||
|
||||
//virtual PlatformDisplay& getDisplay() = 0;
|
||||
virtual PlatformWindow* createWindow(Window* window) = 0;
|
||||
|
||||
virtual PlatformInput& getInput() = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
#include "X11Window.h"
|
||||
#include "UnixApplication.h"
|
||||
#include "Xlib.h"
|
||||
|
||||
|
|
@ -14,6 +15,11 @@ void UnixApplication::shutdown()
|
|||
Xlib::shutdown();
|
||||
}
|
||||
|
||||
PlatformWindow* UnixApplication::createWindow(Window* window)
|
||||
{
|
||||
return new X11Window(window);
|
||||
}
|
||||
|
||||
PlatformInput& UnixApplication::getInput()
|
||||
{
|
||||
return m_input;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ public :
|
|||
|
||||
virtual void shutdown();
|
||||
|
||||
virtual PlatformWindow* createWindow(Window* window);
|
||||
|
||||
virtual PlatformInput& getInput();
|
||||
|
||||
protected :
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
#include "Win32Window.h"
|
||||
#include "Win32Application.h"
|
||||
|
||||
namespace sp {
|
||||
|
|
@ -11,11 +12,10 @@ void Win32Application::shutdown()
|
|||
{
|
||||
}
|
||||
|
||||
/*
|
||||
PlatformDisplay& Win32Application::getDisplay()
|
||||
PlatformWindow* Win32Application::createWindow(Window* window)
|
||||
{
|
||||
return m_display;
|
||||
} */
|
||||
return new Win32Window(window);
|
||||
}
|
||||
|
||||
PlatformInput& Win32Application::getInput()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public :
|
|||
|
||||
virtual void shutdown();
|
||||
|
||||
//virtual PlatformDisplay& getDisplay();
|
||||
virtual PlatformWindow* createWindow(Window* window);
|
||||
|
||||
virtual PlatformInput& getInput();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue