diff options
Diffstat (limited to 'src/SFML/Window/Unix/WindowImplX11.hpp')
-rw-r--r-- | src/SFML/Window/Unix/WindowImplX11.hpp | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/src/SFML/Window/Unix/WindowImplX11.hpp b/src/SFML/Window/Unix/WindowImplX11.hpp index 973a57d..0ff694b 100644 --- a/src/SFML/Window/Unix/WindowImplX11.hpp +++ b/src/SFML/Window/Unix/WindowImplX11.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2017 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages arising from the use of this software. @@ -31,6 +31,7 @@ #include <SFML/Window/Event.hpp> #include <SFML/Window/WindowImpl.hpp> #include <SFML/System/String.hpp> +#include <SFML/Window/WindowStyle.hpp> // Prevent conflict with macro None from Xlib #include <X11/Xlib.h> #include <deque> @@ -155,6 +156,14 @@ public: virtual void setMouseCursorGrabbed(bool grabbed); //////////////////////////////////////////////////////////// + /// \brief Set the displayed cursor to a native system cursor + /// + /// \param cursor Native system cursor type to display + /// + //////////////////////////////////////////////////////////// + virtual void setMouseCursor(const CursorImpl& cursor); + + //////////////////////////////////////////////////////////// /// \brief Enable or disable automatic key-repeat /// /// \param enabled True to enable, false to disable @@ -258,23 +267,25 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - ::Window m_window; ///< X identifier defining our window - ::Display* m_display; ///< Pointer to the display - int m_screen; ///< Screen identifier - XIM m_inputMethod; ///< Input method linked to the X display - XIC m_inputContext; ///< Input context used to get unicode input in our window - bool m_isExternal; ///< Tell whether the window has been created externally or by SFML - int m_oldVideoMode; ///< Video mode in use before we switch to fullscreen - Cursor m_hiddenCursor; ///< As X11 doesn't provide cursor hidding, we must create a transparent one - bool m_keyRepeat; ///< Is the KeyRepeat feature enabled? - Vector2i m_previousSize; ///< Previous size of the window, to find if a ConfigureNotify event is a resize event (could be a move event only) - bool m_useSizeHints; ///< Is the size of the window fixed with size hints? - bool m_fullscreen; ///< Is the window in fullscreen? - bool m_cursorGrabbed; ///< Is the mouse cursor trapped? - bool m_windowMapped; ///< Has the window been mapped by the window manager? - Pixmap m_iconPixmap; ///< The current icon pixmap if in use - Pixmap m_iconMaskPixmap; ///< The current icon mask pixmap if in use - ::Time m_lastInputTime; ///< Last time we received user input + ::Window m_window; ///< X identifier defining our window + ::Display* m_display; ///< Pointer to the display + int m_screen; ///< Screen identifier + XIM m_inputMethod; ///< Input method linked to the X display + XIC m_inputContext; ///< Input context used to get unicode input in our window + std::deque<XEvent> m_events; ///< Queue we use to store pending events for this window + bool m_isExternal; ///< Tell whether the window has been created externally or by SFML + int m_oldVideoMode; ///< Video mode in use before we switch to fullscreen + ::Cursor m_hiddenCursor; ///< As X11 doesn't provide cursor hiding, we must create a transparent one + ::Cursor m_lastCursor; ///< Last cursor used -- this data is not owned by the window and is required to be always valid + bool m_keyRepeat; ///< Is the KeyRepeat feature enabled? + Vector2i m_previousSize; ///< Previous size of the window, to find if a ConfigureNotify event is a resize event (could be a move event only) + bool m_useSizeHints; ///< Is the size of the window fixed with size hints? + bool m_fullscreen; ///< Is the window in fullscreen? + bool m_cursorGrabbed; ///< Is the mouse cursor trapped? + bool m_windowMapped; ///< Has the window been mapped by the window manager? + Pixmap m_iconPixmap; ///< The current icon pixmap if in use + Pixmap m_iconMaskPixmap; ///< The current icon mask pixmap if in use + ::Time m_lastInputTime; ///< Last time we received user input }; } // namespace priv |