1
0
Fork 0
spectre/source/Platform/PlatformDisplay.h
2016-01-10 09:26:43 +01:00

52 lines
No EOL
996 B
C++

#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 */