diff options
author | James Cowgill <james410@cowgill.org.uk> | 2014-12-09 20:21:40 +0000 |
---|---|---|
committer | James Cowgill <james410@cowgill.org.uk> | 2014-12-09 20:21:40 +0000 |
commit | fa21c65d0c764705cfc377bf0d0de08fac26874e (patch) | |
tree | dbc9e87bbd8684d15e79fc0c8b7a8985389c3b35 /src/SFML/Window/OSX/InputImpl.hpp | |
parent | dd835931261c340acd5f0409341d13fa2670423e (diff) |
Imported Upstream version 2.2.0+dfsg
Diffstat (limited to 'src/SFML/Window/OSX/InputImpl.hpp')
-rw-r--r-- | src/SFML/Window/OSX/InputImpl.hpp | 51 |
1 files changed, 48 insertions, 3 deletions
diff --git a/src/SFML/Window/OSX/InputImpl.hpp b/src/SFML/Window/OSX/InputImpl.hpp index c3700ce..20bc14f 100644 --- a/src/SFML/Window/OSX/InputImpl.hpp +++ b/src/SFML/Window/OSX/InputImpl.hpp @@ -1,8 +1,8 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2013 Marco Antognini (antognini.marco@gmail.com), -// Laurent Gomila (laurent.gom@gmail.com), +// Copyright (C) 2007-2014 Marco Antognini (antognini.marco@gmail.com), +// Laurent Gomila (laurent.gom@gmail.com), // // 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. @@ -43,7 +43,7 @@ namespace priv //////////////////////////////////////////////////////////// class InputImpl { -public : +public: //////////////////////////////////////////////////////////// /// \brief Check if a key is pressed @@ -56,6 +56,14 @@ public : static bool isKeyPressed(Keyboard::Key key); //////////////////////////////////////////////////////////// + /// \brief Show or hide the virtual keyboard + /// + /// \param visible True to show, false to hide + /// + //////////////////////////////////////////////////////////// + static void setVirtualKeyboardVisible(bool visible); + + //////////////////////////////////////////////////////////// /// \brief Check if a mouse button is pressed /// /// \param button Button to check @@ -114,6 +122,43 @@ public : /// //////////////////////////////////////////////////////////// static void setMousePosition(const Vector2i& position, const Window& relativeTo); + + //////////////////////////////////////////////////////////// + /// \brief Check if a touch event is currently down + /// + /// \param finger Finger index + /// + /// \return True if \a finger is currently touching the screen, false otherwise + /// + //////////////////////////////////////////////////////////// + static bool isTouchDown(unsigned int finger); + + //////////////////////////////////////////////////////////// + /// \brief Get the current position of a touch in desktop coordinates + /// + /// This function returns the current touch position + /// in global (desktop) coordinates. + /// + /// \param finger Finger index + /// + /// \return Current position of \a finger, or undefined if it's not down + /// + //////////////////////////////////////////////////////////// + static Vector2i getTouchPosition(unsigned int finger); + + //////////////////////////////////////////////////////////// + /// \brief Get the current position of a touch in window coordinates + /// + /// This function returns the current touch position + /// in global (desktop) coordinates. + /// + /// \param finger Finger index + /// \param relativeTo Reference window + /// + /// \return Current position of \a finger, or undefined if it's not down + /// + //////////////////////////////////////////////////////////// + static Vector2i getTouchPosition(unsigned int finger, const Window& relativeTo); }; } // namespace priv |