kodi
KeymapEnvironment.h
1 /*
2  * Copyright (C) 2017-2024 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 "input/keymaps/interfaces/IKeymapEnvironment.h"
12 
13 namespace KODI
14 {
15 namespace KEYMAP
16 {
21 {
22 public:
23  ~CKeymapEnvironment() override = default;
24 
25  // implementation of IKeymapEnvironment
26  int GetWindowID() const override { return m_windowId; }
27  void SetWindowID(int windowId) override { m_windowId = windowId; }
28  int GetFallthrough(int windowId) const override;
29  bool UseGlobalFallthrough() const override { return true; }
30  bool UseEasterEgg() const override { return true; }
31 
32 private:
33  int m_windowId = -1;
34 };
35 } // namespace KEYMAP
36 } // namespace KODI
int GetWindowID() const override
Get the window ID for which actions should be translated.
Definition: KeymapEnvironment.h:26
void SetWindowID(int windowId) override
Set the window ID.
Definition: KeymapEnvironment.h:27
bool UseEasterEgg() const override
Specify if the agent should monitor for easter egg presses.
Definition: KeymapEnvironment.h:30
int GetFallthrough(int windowId) const override
Get the fallthrough window to when a key definition is missing.
Definition: KeymapEnvironment.cpp:16
Customizes the environment in which keymapping is performed.
Definition: IKeymapEnvironment.h:27
bool UseGlobalFallthrough() const override
Specify if the global keymap should be used when the window and fallback window are undefined...
Definition: KeymapEnvironment.h:29
Definition: AudioDecoder.h:18
Definition: KeymapEnvironment.h:20