VTB: release CVBuffer after it actually has been rendered
[xbmc.git] / xbmc / input / KeyboardLayout.h
blobfd3cd836b75aab31b0d9a7595f5ac61ff6b52a25
1 #pragma once
2 /*
3 * Copyright (C) 2005-2013 Team Kodi
4 * http://kodi.tv
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with XBMC; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
22 #include <map>
23 #include <string>
24 #include <vector>
26 #include "InputCodingTable.h"
28 class TiXmlElement;
30 class CKeyboardLayout
32 public:
33 CKeyboardLayout();
34 virtual ~CKeyboardLayout();
35 IInputCodingTablePtr GetCodingTable() { return m_codingtable; }
37 bool Load(const TiXmlElement* element);
39 std::string GetIdentifier() const;
40 std::string GetName() const;
41 const std::string& GetLanguage() const { return m_language; }
42 const std::string& GetLayout() const { return m_layout; }
44 enum ModifierKey
46 ModifierKeyNone = 0x00,
47 ModifierKeyShift = 0x01,
48 ModifierKeySymbol = 0x02
51 std::string GetCharAt(unsigned int row, unsigned int column, unsigned int modifiers = 0) const;
53 private:
54 static std::vector<std::string> BreakCharacters(const std::string &chars);
56 typedef std::vector< std::vector<std::string> > KeyboardRows;
57 typedef std::map<unsigned int, KeyboardRows> Keyboards;
59 std::string m_language;
60 std::string m_layout;
61 Keyboards m_keyboards;
62 IInputCodingTablePtr m_codingtable;