From 77567e965630b2ecc78e861d9389bda1aa2674f0 Mon Sep 17 00:00:00 2001 From: Jonathan De Wachter Date: Thu, 24 Oct 2013 13:05:48 +0200 Subject: [PATCH] Implemented missing setVirtualKeyboardVisible method on desktop platforms --- src/SFML/Window/Keyboard.cpp | 2 +- src/SFML/Window/OSX/InputImpl.hpp | 8 ++++++++ src/SFML/Window/OSX/InputImpl.mm | 7 +++++++ src/SFML/Window/Unix/InputImpl.cpp | 7 +++++++ src/SFML/Window/Unix/InputImpl.hpp | 8 ++++++++ src/SFML/Window/Win32/InputImpl.cpp | 7 +++++++ src/SFML/Window/Win32/InputImpl.hpp | 8 ++++++++ 7 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/SFML/Window/Keyboard.cpp b/src/SFML/Window/Keyboard.cpp index 2e4e14260..e8afc6704 100644 --- a/src/SFML/Window/Keyboard.cpp +++ b/src/SFML/Window/Keyboard.cpp @@ -41,7 +41,7 @@ bool Keyboard::isKeyPressed(Key key) //////////////////////////////////////////////////////////// void Keyboard::setVirtualKeyboardVisible(bool visible) { - return priv::InputImpl::setVirtualKeyboardVisible(visible); + priv::InputImpl::setVirtualKeyboardVisible(visible); } } // namespace sf diff --git a/src/SFML/Window/OSX/InputImpl.hpp b/src/SFML/Window/OSX/InputImpl.hpp index 8ddd8efb5..40acdd4dd 100644 --- a/src/SFML/Window/OSX/InputImpl.hpp +++ b/src/SFML/Window/OSX/InputImpl.hpp @@ -55,6 +55,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 /// diff --git a/src/SFML/Window/OSX/InputImpl.mm b/src/SFML/Window/OSX/InputImpl.mm index 539b9daa2..fd5fa38e1 100644 --- a/src/SFML/Window/OSX/InputImpl.mm +++ b/src/SFML/Window/OSX/InputImpl.mm @@ -112,6 +112,13 @@ bool InputImpl::isKeyPressed(Keyboard::Key key) } +//////////////////////////////////////////////////////////// +void InputImpl::setVirtualKeyboardVisible(bool visible) +{ + // Not applicable +} + + //////////////////////////////////////////////////////////// bool InputImpl::isMouseButtonPressed(Mouse::Button button) { diff --git a/src/SFML/Window/Unix/InputImpl.cpp b/src/SFML/Window/Unix/InputImpl.cpp index c0bc1822e..8ff76976f 100644 --- a/src/SFML/Window/Unix/InputImpl.cpp +++ b/src/SFML/Window/Unix/InputImpl.cpp @@ -174,6 +174,13 @@ bool InputImpl::isKeyPressed(Keyboard::Key key) } +//////////////////////////////////////////////////////////// +void InputImpl::setVirtualKeyboardVisible(bool visible) +{ + // Not applicable +} + + //////////////////////////////////////////////////////////// bool InputImpl::isMouseButtonPressed(Mouse::Button button) { diff --git a/src/SFML/Window/Unix/InputImpl.hpp b/src/SFML/Window/Unix/InputImpl.hpp index a5fbcc888..a77690d36 100644 --- a/src/SFML/Window/Unix/InputImpl.hpp +++ b/src/SFML/Window/Unix/InputImpl.hpp @@ -54,6 +54,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 /// diff --git a/src/SFML/Window/Win32/InputImpl.cpp b/src/SFML/Window/Win32/InputImpl.cpp index 5bd187a1b..bace5120f 100644 --- a/src/SFML/Window/Win32/InputImpl.cpp +++ b/src/SFML/Window/Win32/InputImpl.cpp @@ -156,6 +156,13 @@ bool InputImpl::isKeyPressed(Keyboard::Key key) } +//////////////////////////////////////////////////////////// +void InputImpl::setVirtualKeyboardVisible(bool visible) +{ + // Not applicable +} + + //////////////////////////////////////////////////////////// bool InputImpl::isMouseButtonPressed(Mouse::Button button) { diff --git a/src/SFML/Window/Win32/InputImpl.hpp b/src/SFML/Window/Win32/InputImpl.hpp index a724a66cd..0d1ebeb1b 100644 --- a/src/SFML/Window/Win32/InputImpl.hpp +++ b/src/SFML/Window/Win32/InputImpl.hpp @@ -54,6 +54,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 ///