~ubuntu-branches/debian/sid/kodi/sid

« back to all changes in this revision

Viewing changes to xbmc/input/KeyboardLayoutConfiguration.h

  • Committer: Package Import Robot
  • Author(s): Balint Reczey
  • Date: 2015-08-18 14:16:59 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20150818141659-4lgq2pksj7918osz
Tags: 15.1+dfsg1-1
* New upstream release 15.0
  See http://www.kodi.tv/kodi-15-0-isengard-one-release-to-rule-them-all/
* Depend on libav.*-dev provided by src:ffmpeg
* Recommend udisks2 instead of udisks.
  Udisks has been removed from unstable but support for udisks2 is not
  implemented yet.
* Ship patch helping Jessie backports
* Refresh patches
* Eliminate __DATE__ macros from source to make build more reproducible
* Build-depend on libsdl2.*-dev instead of libsdl.*-dev
* Build-depend on libgif-dev
* Drop obsoleted fix of installed header's include paths
* Refresh include file list included by kodi-addons-dev
* Build depend on libcec (>= 3)
* Build-depend on groovy2 instead of groovy
* Sort build dependencies
* Fix packaging repository URL
* Remove removed files from debian/copyright
* Fix filenames with spaces in debian/copyright
* Ship TexturePacker in kodi-addons-dev in /usr/lib/kodi
* Build depend on libcec-platform-dev
* Stop using embedded gnulib modules in rsxs screensaver (Closes: #795813)
* Add missing copyright paragraphs to d/copyright
* Stop marking files as excluded which are removed from upstream tarball
  already
* Bump standards version to 3.9.6
* New upstream release 15.1
  See http://kodi.tv/kodi-15-1-isengard-maintenance-release/
* Move TexturePacker to kodi-bin
* Stop building TexturePacker statically

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef KEYBOARDLAYOUTCONFIGURATION_H
2
 
#define KEYBOARDLAYOUTCONFIGURATION_H
3
 
 
4
 
/*
5
 
 *      Copyright (C) 2005-2013 Team XBMC
6
 
 *      http://xbmc.org
7
 
 *
8
 
 *  This Program is free software; you can redistribute it and/or modify
9
 
 *  it under the terms of the GNU General Public License as published by
10
 
 *  the Free Software Foundation; either version 2, or (at your option)
11
 
 *  any later version.
12
 
 *
13
 
 *  This Program is distributed in the hope that it will be useful,
14
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
 
 *  GNU General Public License for more details.
17
 
 *
18
 
 *  You should have received a copy of the GNU General Public License
19
 
 *  along with XBMC; see the file COPYING.  If not, see
20
 
 *  <http://www.gnu.org/licenses/>.
21
 
 *
22
 
 */
23
 
 
24
 
// Comment OUT, if not really debugging!!!
25
 
// #define DEBUG_KEYBOARD_GETCHAR
26
 
 
27
 
#ifdef TARGET_POSIX
28
 
#include "linux/PlatformDefs.h"
29
 
#elif defined (TARGET_WINDOWS)
30
 
#include "windows.h"
31
 
#else
32
 
#include "xtl.h"
33
 
#endif
34
 
 
35
 
#include <map>
36
 
#include <string>
37
 
#include "utils/log.h"
38
 
 
39
 
class TiXmlElement;
40
 
 
41
 
class CKeyboardLayoutConfiguration
42
 
{
43
 
public:
44
 
  CKeyboardLayoutConfiguration();
45
 
  ~CKeyboardLayoutConfiguration();
46
 
 
47
 
  bool Load(const std::string& strFileName);
48
 
 
49
 
  bool containsChangeXbmcCharRegardlessModifiers(WCHAR key);
50
 
  bool containsChangeXbmcCharWithRalt(WCHAR key);
51
 
  bool containsDeriveXbmcCharFromVkeyRegardlessModifiers(BYTE key);
52
 
  bool containsDeriveXbmcCharFromVkeyWithShift(BYTE key);
53
 
  bool containsDeriveXbmcCharFromVkeyWithRalt(BYTE key);
54
 
 
55
 
  WCHAR valueOfChangeXbmcCharRegardlessModifiers(WCHAR key);
56
 
  WCHAR valueOfChangeXbmcCharWithRalt(WCHAR key);
57
 
  WCHAR valueOfDeriveXbmcCharFromVkeyRegardlessModifiers(BYTE key);
58
 
  WCHAR valueOfDeriveXbmcCharFromVkeyWithShift(BYTE key);
59
 
  WCHAR valueOfDeriveXbmcCharFromVkeyWithRalt(BYTE key);
60
 
 
61
 
private:
62
 
  std::map<WCHAR, WCHAR> m_changeXbmcCharRegardlessModifiers;
63
 
  std::map<WCHAR, WCHAR> m_changeXbmcCharWithRalt;
64
 
  std::map<BYTE, WCHAR> m_deriveXbmcCharFromVkeyRegardlessModifiers;
65
 
  std::map<BYTE, WCHAR> m_deriveXbmcCharFromVkeyWithShift;
66
 
  std::map<BYTE, WCHAR> m_deriveXbmcCharFromVkeyWithRalt;
67
 
 
68
 
  void SetDefaults();
69
 
  void readCharMapFromXML(const TiXmlElement* pXMLMap, std::map<WCHAR, WCHAR>& charToCharMap, const char* mapRootElement);
70
 
  void readByteMapFromXML(const TiXmlElement* pXMLMap, std::map<BYTE, WCHAR>& charToCharMap, const char* mapRootElement);
71
 
};
72
 
 
73
 
extern CKeyboardLayoutConfiguration g_keyboardLayoutConfiguration;
74
 
 
75
 
#endif