Utility/Window: Add new event system, based on signals
Old pooling-based system remains for now but is now deprecated Former-commit-id: 9482b37fb19041399b7c26181319e1c00e7678fd [formerly 516aa322ca7f656e3e7c66010248b63068eec723] [formerly 6fdb81e8d59fef7d6e10e58898878d3e1a796188 [formerly c999fe23b149e14bdeeefed5436839fe44e1ebc3]] Former-commit-id: fb35c9017bc2c7d15e31ccadb3f943ca2f0332df [formerly 005fa120540dc1a2d09e30c2de9611c4cb98aecf] Former-commit-id: d51482384fffb5d1b339f3ce39df1a1ed6018228
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#include <Nazara/Math/Vector2.hpp>
|
||||
#include <Nazara/Utility/Config.hpp>
|
||||
#include <Nazara/Utility/Enums.hpp>
|
||||
#include <Nazara/Utility/Event.hpp>
|
||||
#include <Nazara/Utility/EventHandler.hpp>
|
||||
#include <Nazara/Utility/VideoMode.hpp>
|
||||
#include <Nazara/Utility/WindowHandle.hpp>
|
||||
#include <queue>
|
||||
@@ -52,9 +52,11 @@ namespace Nz
|
||||
|
||||
void Destroy();
|
||||
|
||||
NAZARA_DEPRECATED("Event pooling/waiting is deprecated, please use the EventHandler system") inline void EnableEventPolling(bool enable);
|
||||
void EnableKeyRepeat(bool enable);
|
||||
void EnableSmoothScrolling(bool enable);
|
||||
|
||||
EventHandler& GetEventHandler();
|
||||
WindowHandle GetHandle() const;
|
||||
unsigned int GetHeight() const;
|
||||
Vector2i GetPosition() const;
|
||||
@@ -71,7 +73,9 @@ namespace Nz
|
||||
inline bool IsValid() const;
|
||||
bool IsVisible() const;
|
||||
|
||||
bool PollEvent(WindowEvent* event);
|
||||
NAZARA_DEPRECATED("Event pooling/waiting is deprecated, please use the EventHandler system") bool PollEvent(WindowEvent* event);
|
||||
|
||||
void ProcessEvents(bool block = false);
|
||||
|
||||
void SetCursor(WindowCursor cursor);
|
||||
void SetCursor(const Cursor& cursor);
|
||||
@@ -90,7 +94,7 @@ namespace Nz
|
||||
void SetTitle(const String& title);
|
||||
void SetVisible(bool visible);
|
||||
|
||||
bool WaitEvent(WindowEvent* event);
|
||||
NAZARA_DEPRECATED("Event pooling/waiting is deprecated, please use the EventHandler system")bool WaitEvent(WindowEvent* event);
|
||||
|
||||
Window& operator=(const Window&) = delete;
|
||||
inline Window& operator=(Window&& window);
|
||||
@@ -114,10 +118,11 @@ namespace Nz
|
||||
ConditionVariable m_eventCondition;
|
||||
Mutex m_eventMutex;
|
||||
Mutex m_eventConditionMutex;
|
||||
bool m_eventListener;
|
||||
bool m_waitForEvent;
|
||||
#endif
|
||||
EventHandler m_eventHandler;
|
||||
bool m_closed;
|
||||
bool m_eventPolling;
|
||||
bool m_ownsWindow;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user