2 * Copyright (C) 2005-2024 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
15 class IInputCodingTable
23 virtual int GetType() { return TYPE_WORD_LIST
; }
25 virtual ~IInputCodingTable() = default;
26 /*! \brief Called for the active keyboard layout when it's loaded, stick any initialization here
28 This won't be needed for most implementations so we don't set it =0 but provide a default
31 virtual void Initialize() {}
33 /*! \brief Called for the active keyboard layout when it's unloaded, stick any cleanup here
35 This won't be needed for most implementations so we don't set it =0 but provide a default
38 virtual void Deinitialize() {}
40 /*! \brief Can be overridden if initialization is expensive to avoid calling initialize more than
43 \return true if initialization has been done and was successful, false otherwise.
45 virtual bool IsInitialized() const { return true; }
46 virtual bool GetWordListPage(const std::string
& strCode
, bool isFirstPage
) = 0;
47 virtual std::vector
<std::wstring
> GetResponse(int response
) = 0;
48 const std::string
& GetCodeChars() const { return m_codechars
; }
50 virtual void SetTextPrev(const std::string
& strTextPrev
) {}
51 virtual std::string
ConvertString(const std::string
& strCode
) { return std::string(""); }
54 std::string m_codechars
;
57 typedef std::shared_ptr
<IInputCodingTable
> IInputCodingTablePtr
;