Platform/PlatformApplication: define getMessageQueue() here as it is not platform specific.
This commit is contained in:
parent
4380f1ed01
commit
2ac3b5b8cc
6 changed files with 12 additions and 18 deletions
|
|
@ -19,4 +19,9 @@ PlatformApplication* PlatformApplication::get()
|
||||||
return &inst;
|
return &inst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MessageQueue& PlatformApplication::getMessageQueue()
|
||||||
|
{
|
||||||
|
return m_messageQueue;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace sp
|
} // namespace sp
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,13 @@
|
||||||
#ifndef SPECTRE_PLATFORM_H
|
#ifndef SPECTRE_PLATFORM_H
|
||||||
#define SPECTRE_PLATFORM_H
|
#define SPECTRE_PLATFORM_H
|
||||||
|
|
||||||
|
#include <Spectre/System/MessageQueue.h>
|
||||||
#include <Spectre/Core/NonCopyable.h>
|
#include <Spectre/Core/NonCopyable.h>
|
||||||
|
|
||||||
namespace sp {
|
namespace sp {
|
||||||
|
|
||||||
class PlatformInput;
|
class PlatformInput;
|
||||||
class PlatformDisplay;
|
class PlatformDisplay;
|
||||||
class MessageQueue;
|
|
||||||
|
|
||||||
class PlatformApplication : NonCopyable
|
class PlatformApplication : NonCopyable
|
||||||
{
|
{
|
||||||
|
|
@ -23,7 +23,12 @@ public :
|
||||||
|
|
||||||
virtual PlatformInput& getInput() = 0;
|
virtual PlatformInput& getInput() = 0;
|
||||||
|
|
||||||
virtual MessageQueue& getMessageQueue() = 0;
|
MessageQueue& getMessageQueue();
|
||||||
|
|
||||||
|
protected :
|
||||||
|
|
||||||
|
MessageQueue m_messageQueue;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sp
|
} // namespace sp
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,4 @@ PlatformInput& UnixApplication::getInput()
|
||||||
return m_input;
|
return m_input;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageQueue& UnixApplication::getMessageQueue()
|
|
||||||
{
|
|
||||||
return m_messageQueue;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace sp
|
} // namespace sp
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,9 @@ public :
|
||||||
|
|
||||||
virtual PlatformInput& getInput();
|
virtual PlatformInput& getInput();
|
||||||
|
|
||||||
virtual MessageQueue& getMessageQueue();
|
|
||||||
|
|
||||||
protected :
|
protected :
|
||||||
|
|
||||||
X11Input m_input;
|
X11Input m_input;
|
||||||
MessageQueue m_messageQueue;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sp
|
} // namespace sp
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,4 @@ PlatformInput& Win32Application::getInput()
|
||||||
return m_input;
|
return m_input;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageQueue& Win32Application::getMessageQueue()
|
|
||||||
{
|
|
||||||
return m_messageQueue;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace sp
|
} // namespace sp
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,10 @@ public :
|
||||||
|
|
||||||
virtual PlatformInput& getInput();
|
virtual PlatformInput& getInput();
|
||||||
|
|
||||||
virtual MessageQueue& getMessageQueue();
|
|
||||||
|
|
||||||
protected :
|
protected :
|
||||||
|
|
||||||
//Win32Display m_display;
|
//Win32Display m_display;
|
||||||
Win32Input m_input;
|
Win32Input m_input;
|
||||||
MessageQueue m_messageQueue;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sp
|
} // namespace sp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue