xbmc
GUIAgentWindow.h
1 /*
2  * Copyright (C) 2022-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 #include "guilib/GUIDialog.h"
13 
14 #include <memory>
15 
16 namespace KODI
17 {
18 namespace GAME
19 {
20 class IActivePortList;
21 class IAgentList;
22 
27 {
28 public:
30  ~CGUIAgentWindow() override;
31 
32  // Implementation of CGUIControl via CGUIDialog
33  bool OnMessage(CGUIMessage& message) override;
34 
35 protected:
36  // Implementation of CGUIWindow via CGUIDialog
37  void FrameMove() override;
38  void OnWindowLoaded() override;
39  void OnWindowUnload() override;
40  void OnInitWindow() override;
41  void OnDeinitWindow(int nextWindowID) override;
42 
43 private:
44  // Window actions
45  void CloseDialog();
46 
47  // Actions for port list
48  void UpdateActivePortList();
49 
50  // Actions for agent list
51  void UpdateAgentList();
52  void FocusAgentList();
53  void OnAgentClick();
54 
55  // GUI parameters
56  std::unique_ptr<IActivePortList> m_portList;
57  std::unique_ptr<IAgentList> m_agentList;
58 
59  // Game parameters
60  GameClientPtr m_gameClient;
61 };
62 } // namespace GAME
63 } // namespace KODI
void FrameMove() override
Main update function, called every frame prior to rendering Any window that requires updating on a fr...
Definition: GUIAgentWindow.cpp:114
Definition: GUIDialog.h:35
Definition: AudioDecoder.h:18
std::shared_ptr< CGameClient > GameClientPtr
Smart pointer to a game client (CGameClient)
Definition: GameTypes.h:29
Definition: GUIMessage.h:365
void OnInitWindow() override
Called on window open.
Definition: GUIAgentWindow.cpp:135
Definition: GUIAgentWindow.h:26