56 lines
1 KiB
C++
56 lines
1 KiB
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>
|
|
|
|
namespace sp {
|
|
|
|
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;
|
|
};
|
|
|
|
} // namespace sp
|
|
|
|
#endif /* SPECTRE_PLATFORM_DISPLAY_H */
|