| 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 |
#include "guilib/GUIDialog.h" |
| 13 |
|
| 14 |
#include <memory> |
| 15 |
|
| 16 |
namespace KODI |
| 17 |
{ |
| 18 |
namespace GAME |
| 19 |
{ |
| 20 |
class IPortList; |
| 21 |
|
| 22 |
/*! |
| 23 |
* \ingroup games |
| 24 |
*/ |
| 25 |
class CGUIPortWindow : public CGUIDialog |
| 26 |
{ |
| 27 |
public: |
| 28 |
CGUIPortWindow(); |
| 29 |
~CGUIPortWindow() override; |
| 30 |
|
| 31 |
// Implementation of CGUIControl via CGUIDialog |
| 32 |
bool OnMessage(CGUIMessage& message) override; |
| 33 |
|
| 34 |
protected: |
| 35 |
// Implementation of CGUIWindow via CGUIDialog |
| 36 |
void OnWindowLoaded() override; |
| 37 |
void OnWindowUnload() override; |
| 38 |
void OnInitWindow() override; |
| 39 |
void OnDeinitWindow(int nextWindowID) override; |
| 40 |
void FrameMove() override; |
| 41 |
|
| 42 |
private: |
| 43 |
// Actions for port list |
| 44 |
void UpdatePortList(); |
| 45 |
void FocusPortList(); |
| 46 |
bool OnClickAction(); |
| 47 |
|
| 48 |
// Actions for the available buttons |
| 49 |
void ResetPorts(); |
| 50 |
void CloseDialog(); |
| 51 |
|
| 52 |
// GUI parameters |
| 53 |
std::unique_ptr<IPortList> m_portList; |
| 54 |
|
| 55 |
// Game parameters |
| 56 |
GameClientPtr m_gameClient; |
| 57 |
}; |
| 58 |
} // namespace GAME |
| 59 |
} // namespace KODI |