25 #ifndef SFML_WINDOWIMPL_HPP 26 #define SFML_WINDOWIMPL_HPP 31 #include <SFML/Config.hpp> 32 #include <SFML/System/NonCopyable.hpp> 33 #include <SFML/Window/Joystick.hpp> 34 #include <SFML/Window/VideoMode.hpp> 35 #include <SFML/Window/WindowHandle.hpp> 36 #include <SFML/Window/WindowSettings.hpp> 51 class WindowImpl : NonCopyable
61 static WindowImpl* New();
74 static WindowImpl* New(VideoMode Mode,
const std::string& Title,
unsigned long WindowStyle, WindowSettings& Params);
85 static WindowImpl* New(WindowHandle Handle, WindowSettings& Params);
93 virtual ~WindowImpl();
101 void AddListener(WindowListener* Listener);
109 void RemoveListener(WindowListener* Listener);
123 unsigned int GetWidth()
const;
131 unsigned int GetHeight()
const;
140 virtual void SetActive(
bool Active =
true)
const = 0;
149 void SetJoystickThreshold(
float Threshold);
163 static bool IsContextActive();
169 virtual void Display() = 0;
177 virtual void UseVerticalSync(
bool Enabled) = 0;
185 virtual void ShowMouseCursor(
bool Show) = 0;
194 virtual void SetCursorPosition(
unsigned int Left,
unsigned int Top) = 0;
203 virtual void SetPosition(
int Left,
int Top) = 0;
212 virtual void SetSize(
unsigned int Width,
unsigned int Height) = 0;
220 virtual void Show(
bool State) = 0;
228 virtual void EnableKeyRepeat(
bool Enabled) = 0;
238 virtual void SetIcon(
unsigned int Width,
unsigned int Height,
const Uint8* Pixels) = 0;
254 void SendEvent(
const Event& EventToSend);
271 static int EvaluateConfig(
const VideoMode& Mode,
const WindowSettings& Settings,
int ColorBits,
int DepthBits,
int StencilBits,
int Antialiasing);
276 unsigned int myWidth;
277 unsigned int myHeight;
285 void ProcessJoystickEvents();
291 virtual void ProcessEvents() = 0;
296 std::set<WindowListener*> myListeners;
299 float myJoyThreshold;
307 #endif // SFML_WINDOWIMPL_HPP
Total number of supported joysticks.