xbmc
GUIDialogIgnoreInput.h
1 /*
2  * Copyright (C) 2017-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 "GUIDialogButtonCapture.h"
12 #include "input/joysticks/DriverPrimitive.h"
13 
14 #include <string>
15 #include <vector>
16 
17 namespace KODI
18 {
19 namespace GAME
20 {
22 {
23 public:
24  CGUIDialogIgnoreInput() = default;
25 
26  ~CGUIDialogIgnoreInput() override = default;
27 
28  // specialization of IButtonMapper via CGUIDialogButtonCapture
29  bool AcceptsPrimitive(JOYSTICK::PRIMITIVE_TYPE type) const override;
30 
31 protected:
32  // implementation of CGUIDialogButtonCapture
33  std::string GetDialogText() override;
34  std::string GetDialogHeader() override;
35  bool MapPrimitiveInternal(JOYSTICK::IButtonMap* buttonMap,
36  IKeymap* keymap,
37  const JOYSTICK::CDriverPrimitive& primitive) override;
38  void OnClose(bool bAccepted) override;
39 
40 private:
41  bool AddPrimitive(const JOYSTICK::CDriverPrimitive& primitive);
42 
43  std::string m_location;
44  std::vector<JOYSTICK::CDriverPrimitive> m_capturedPrimitives;
45 };
46 } // namespace GAME
47 } // namespace KODI
Definition: GUIDialogButtonCapture.h:23
Interface for mapping buttons to Kodi actions.
Definition: IKeymap.h:22
Definition: GUIDialogIgnoreInput.h:21
Button map interface to translate between the driver&#39;s raw button/hat/axis elements and physical joys...
Definition: IButtonMap.h:28
PRIMITIVE_TYPE
Type of driver primitive.
Definition: JoystickTypes.h:150
bool AcceptsPrimitive(JOYSTICK::PRIMITIVE_TYPE type) const override
Return true if the button mapper accepts primitives of the given type.
Definition: GUIDialogIgnoreInput.cpp:24
Controller configuration window.
Definition: AudioDecoder.h:18
Basic driver element associated with input events.
Definition: DriverPrimitive.h:69