xbmc
GUIPortWindow.h
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 class CGUIPortWindow : public CGUIDialog
23 {
24 public:
26  ~CGUIPortWindow() override;
27 
28  // Implementation of CGUIControl via CGUIDialog
29  bool OnMessage(CGUIMessage& message) override;
30 
31 protected:
32  // Implementation of CGUIWindow via CGUIDialog
33  void OnWindowLoaded() override;
34  void OnWindowUnload() override;
35  void OnInitWindow() override;
36  void OnDeinitWindow(int nextWindowID) override;
37  void FrameMove() override;
38 
39 private:
40  // Actions for port list
41  void UpdatePortList();
42  void FocusPortList();
43  bool OnClickAction();
44 
45  // Actions for the available buttons
46  void ResetPorts();
47  void CloseDialog();
48 
49  // GUI parameters
50  std::unique_ptr<IPortList> m_portList;
51 
52  // Game parameters
53  GameClientPtr m_gameClient;
54 };
55 } // namespace GAME
56 } // namespace KODI
void FrameMove() override
Main update function, called every frame prior to rendering Any window that requires updating on a fr...
Definition: GUIPortWindow.cpp:153
void OnInitWindow() override
Called on window open.
Definition: GUIPortWindow.cpp:111
Definition: GUIPortWindow.h:22
Definition: GUIDialog.h:35
Controller configuration window.
Definition: AudioDecoder.h:18
Definition: GUIMessage.h:365