| 1 |
/* |
| 2 |
* Copyright (C) 2022-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 |
#include "guilib/GUIDialog.h" |
| 13 |
|
| 14 |
#include <memory> |
| 15 |
|
| 16 |
namespace KODI |
| 17 |
{ |
| 18 |
namespace GAME |
| 19 |
{ |
| 20 |
class IActivePortList; |
| 21 |
class IAgentControllerList; |
| 22 |
|
| 23 |
/*! |
| 24 |
* \ingroup games |
| 25 |
*/ |
| 26 |
class CGUIAgentWindow : public CGUIDialog |
| 27 |
{ |
| 28 |
public: |
| 29 |
CGUIAgentWindow(); |
| 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 controller list |
| 51 |
void UpdateControllerList(); |
| 52 |
void FocusControllerList(); |
| 53 |
void OnControllerClick(); |
| 54 |
|
| 55 |
// GUI parameters |
| 56 |
std::unique_ptr<IActivePortList> m_portList; |
| 57 |
std::unique_ptr<IAgentControllerList> m_controllerList; |
| 58 |
|
| 59 |
// Game parameters |
| 60 |
GameClientPtr m_gameClient; |
| 61 |
}; |
| 62 |
} // namespace GAME |
| 63 |
} // namespace KODI |