xbmc
IAgentList.h
1 /*
2  * Copyright (C) 2021-2023 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 {
36 {
37 public:
38  virtual ~IAgentList() = default;
39 
43  virtual void OnWindowLoaded() = 0;
44 
48  virtual void OnWindowUnload() = 0;
49 
59  virtual bool Initialize(GameClientPtr gameClient) = 0;
60 
64  virtual void Deinitialize() = 0;
65 
69  virtual bool HasControl(int controlId) const = 0;
70 
74  virtual int GetCurrentControl() const = 0;
75 
81  virtual void FrameMove() = 0;
82 
86  virtual void Refresh() = 0;
87 
91  virtual void SetFocused() = 0;
92 
96  virtual void OnSelect() = 0;
97 };
98 } // namespace GAME
99 } // namespace KODI
virtual int GetCurrentControl() const =0
Query the ID of the current control in this list.
virtual void FrameMove()=0
Called once per frame.
virtual void OnWindowLoaded()=0
Callback when the GUI window is loaded.
A list populated by game-playing agents (CGameAgent)
Definition: IAgentList.h:35
virtual bool Initialize(GameClientPtr gameClient)=0
Initialize resources.
virtual bool HasControl(int controlId) const =0
Query if a control with the given ID belongs to this list.
virtual void Refresh()=0
Refresh the contents of the 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 OnWindowUnload()=0
Callback when the GUI window is unloaded.
virtual void Deinitialize()=0
Deinitialize resources.
virtual void OnSelect()=0
The agent list has been selected in the GUI.