kodi
IAgentControllerList.h
1 /*
2  * Copyright (C) 2021-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 "games/GameTypes.h"
12 
13 namespace KODI
14 {
15 namespace GAME
16 {
30 {
31 public:
32  virtual ~IAgentControllerList() = default;
33 
37  virtual void OnWindowLoaded() = 0;
38 
42  virtual void OnWindowUnload() = 0;
43 
53  virtual bool Initialize(GameClientPtr gameClient) = 0;
54 
58  virtual void Deinitialize() = 0;
59 
63  virtual bool HasControl(int controlId) const = 0;
64 
68  virtual int GetCurrentControl() const = 0;
69 
75  virtual void FrameMove() = 0;
76 
80  virtual void Refresh() = 0;
81 
85  virtual void SetFocused() = 0;
86 
90  virtual void OnSelect() = 0;
91 };
92 } // namespace GAME
93 } // namespace KODI
virtual void OnWindowLoaded()=0
Callback when the GUI window is loaded.
A list populated by the controllers of game-playing agents (CGameAgent)
Definition: IAgentControllerList.h:29
virtual void OnWindowUnload()=0
Callback when the GUI window is unloaded.
virtual bool HasControl(int controlId) const =0
Query if a control with the given ID belongs to this list.
virtual void OnSelect()=0
The agent list has been selected in the GUI.
virtual void FrameMove()=0
Called once per frame.
virtual int GetCurrentControl() const =0
Query the ID of the current control in this list.
Definition: AudioDecoder.h:18
std::shared_ptr< CGameClient > GameClientPtr
Smart pointer to a game client (CGameClient)
Definition: GameTypes.h:29
virtual void SetFocused()=0
The agent list has been focused in the GUI.
virtual void Refresh()=0
Refresh the contents of the list.
virtual bool Initialize(GameClientPtr gameClient)=0
Initialize resources.
virtual void Deinitialize()=0
Deinitialize resources.