Convert empty struct to namespace

This commit is contained in:
Chris Thrasher 2023-01-22 11:04:55 -07:00
parent 72cd8781bb
commit 31d946baa0

View File

@ -32,66 +32,62 @@
#include <X11/Xlib.h> // XKeyEvent #include <X11/Xlib.h> // XKeyEvent
namespace sf::priv
{
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief sf::priv::KeyboardImpl helper /// \brief sf::priv::KeyboardImpl helper
/// ///
/// This class implements keyboard handling functions /// This class implements keyboard handling functions
/// to help sf::priv::InputImpl class. /// to help sf::priv::InputImpl class.
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class KeyboardImpl namespace sf::priv::KeyboardImpl
{ {
public: ////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////// /// \copydoc sf::Keyboard::isKeyPressed(Key)
/// \copydoc sf::Keyboard::isKeyPressed(Key) ///
/// ////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////// bool isKeyPressed(Keyboard::Key key);
static bool isKeyPressed(Keyboard::Key key);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \copydoc sf::Keyboard::isKeyPressed(Scancode) /// \copydoc sf::Keyboard::isKeyPressed(Scancode)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
static bool isKeyPressed(Keyboard::Scancode code); bool isKeyPressed(Keyboard::Scancode code);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \copydoc sf::Keyboard::localize /// \copydoc sf::Keyboard::localize
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
static Keyboard::Scancode delocalize(Keyboard::Key key); Keyboard::Scancode delocalize(Keyboard::Key key);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \copydoc sf::Keyboard::delocalize /// \copydoc sf::Keyboard::delocalize
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
static Keyboard::Key localize(Keyboard::Scancode code); Keyboard::Key localize(Keyboard::Scancode code);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \copydoc sf::Keyboard::getDescription /// \copydoc sf::Keyboard::getDescription
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
static String getDescription(Keyboard::Scancode code); String getDescription(Keyboard::Scancode code);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the sf::Keyboard::Key from XKeyEvent /// \brief Get the sf::Keyboard::Key from XKeyEvent
/// ///
/// \param event Event from which key is gotten /// \param event Event from which key is gotten
/// ///
/// \return A key being pressed or released /// \return A key being pressed or released
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
static Keyboard::Key getKeyFromEvent(XKeyEvent& event); Keyboard::Key getKeyFromEvent(XKeyEvent& event);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the sf::Keyboard::Scancode from XKeyEvent /// \brief Get the sf::Keyboard::Scancode from XKeyEvent
/// ///
/// \param event Event from which scancode is gotten /// \param event Event from which scancode is gotten
/// ///
/// \return A scancode of a key being pressed or released /// \return A scancode of a key being pressed or released
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
static Keyboard::Scancode getScancodeFromEvent(XKeyEvent& event); Keyboard::Scancode getScancodeFromEvent(XKeyEvent& event);
};
} // namespace sf::priv } // namespace sf::priv::KeyboardImpl