kodi
IPortList.h
1 /*
2  * Copyright (C) 2021 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 "games/GameTypes.h"
12 
13 namespace KODI
14 {
15 namespace GAME
16 {
32 class IPortList
33 {
34 public:
35  virtual ~IPortList() = default;
36 
40  virtual void OnWindowLoaded() = 0;
41 
45  virtual void OnWindowUnload() = 0;
46 
55  virtual bool Initialize(GameClientPtr gameClient) = 0;
56 
60  virtual void Deinitialize() = 0;
61 
65  virtual bool HasControl(int controlId) = 0;
66 
72  virtual int GetCurrentControl() = 0;
73 
77  virtual void Refresh() = 0;
78 
82  virtual void FrameMove() = 0;
83 
87  virtual void SetFocused() = 0;
88 
94  virtual bool OnSelect() = 0;
95 
99  virtual void ResetPorts() = 0;
100 };
101 } // namespace GAME
102 } // namespace KODI
virtual bool HasControl(int controlId)=0
Query if a control with the given ID belongs to this list.
virtual void SetFocused()=0
The port list has been focused in the GUI.
virtual void OnWindowLoaded()=0
Callback when the GUI window is loaded.
virtual void OnWindowUnload()=0
Callback when the GUI window is unloaded.
virtual bool OnSelect()=0
The port list has been selected.
Definition: AudioDecoder.h:18
virtual bool Initialize(GameClientPtr gameClient)=0
Initialize resources.
std::shared_ptr< CGameClient > GameClientPtr
Smart pointer to a game client (CGameClient)
Definition: GameTypes.h:29
A list populated by controller ports for the port setup window.
Definition: IPortList.h:32
virtual int GetCurrentControl()=0
Query the ID of the current control in this list.
virtual void ResetPorts()=0
Reset the ports to their game add-on&#39;s default configuration.
virtual void Refresh()=0
Refresh the contents of the list.
virtual void FrameMove()=0
Callback when a frame is rendered by the GUI.
virtual void Deinitialize()=0
Deinitialize resources.