1 /* 2 * Copyright (C) 2012-2018 Team Kodi 3 * This file is part of Kodi - https://kodi.tv 4 * 5 * SPDX-License-Identifier: GPL-2.0-or-later 6 * See LICENSES/README.md for more information. 7 */ 8 9 #pragma once 10 11 #include "guilib/GUIKeyboard.h" 12 13 struct CDarwinEmbedKeyboardImpl; 14 15 class CDarwinEmbedKeyboard : public CGUIKeyboard 16 { 17 public: 18 CDarwinEmbedKeyboard(); 19 bool ShowAndGetInput(char_callback_t pCallback, 20 const std::string& initialString, 21 std::string& typedString, 22 const std::string& heading, 23 bool bHiddenInput) override; 24 void Cancel() override; 25 void fireCallback(const std::string& str); 26 void invalidateCallback(); 27 bool SetTextToKeyboard(const std::string& text, bool closeKeyboard = false) override; 28 29 static bool hasExternalKeyboard(); 30 31 private: 32 char_callback_t m_pCharCallback = nullptr; 33 bool m_canceled = false; 34 std::unique_ptr<CDarwinEmbedKeyboardImpl> m_impl; 35 }; 36