1
0
Fork 0
spectre/source/Platform/PlatformDisplay.h
Henrik Hautakoski e10daeaaa6
Move everything from global namespace to "sp" namespace
When writing the X11 (linux) implementation there was a problem with X11 defining a "Display" type and we also have a Display class in the engine.

So to fix that problem and minimize the risk for running into other name conflicts. We move everything from global namespace.
2019-09-30 19:10:17 +02:00

56 lines
No EOL
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 */