Initial commit
This commit is contained in:
commit
edfc5298e1
252 changed files with 93965 additions and 0 deletions
52
source/Platform/PlatformDisplay.h
Normal file
52
source/Platform/PlatformDisplay.h
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
|
||||
#ifndef SPECTRE_PLATFORM_DISPLAY_H
|
||||
#define SPECTRE_PLATFORM_DISPLAY_H
|
||||
|
||||
#include <Spectre/Math/Vector2.h>
|
||||
#include <Spectre/Display/DisplayDescription.h>
|
||||
|
||||
// Low-level platform dependant API.
|
||||
#include <string>
|
||||
|
||||
class Display;
|
||||
|
||||
class PlatformDisplay
|
||||
{
|
||||
public :
|
||||
// Factory method.
|
||||
static PlatformDisplay* make(Display* parent);
|
||||
|
||||
virtual ~PlatformDisplay();
|
||||
|
||||
virtual bool create(DisplayDescription description) = 0;
|
||||
|
||||
virtual void destroy() = 0;
|
||||
|
||||
virtual void* getHandle() const = 0;
|
||||
|
||||
virtual bool isValid() = 0;
|
||||
|
||||
virtual void setSize(unsigned int width, unsigned int height) = 0;
|
||||
|
||||
virtual Vector2u getSize() const = 0;
|
||||
|
||||
virtual void setPosition(unsigned int x, unsigned int y) = 0;
|
||||
|
||||
virtual void setCaption(const std::string& caption) = 0;
|
||||
|
||||
virtual void setIcon(const std::string& icon) = 0;
|
||||
|
||||
virtual void showCursor(bool value) = 0;
|
||||
|
||||
protected :
|
||||
|
||||
PlatformDisplay();
|
||||
|
||||
void onReshape(int width, int height);
|
||||
|
||||
private :
|
||||
|
||||
Display* m_parent;
|
||||
};
|
||||
|
||||
#endif /* SPECTRE_PLATFORM_DISPLAY_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue