xbmc
GUIWindowGames.h
1 /*
2  * Copyright (C) 2012-2018 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 "windows/GUIMediaWindow.h"
12 
13 class CGUIDialogProgress;
14 
15 namespace KODI
16 {
17 namespace GAME
18 {
23 {
24 public:
26  ~CGUIWindowGames() override = default;
27 
28  // implementation of CGUIControl via CGUIMediaWindow
29  bool OnMessage(CGUIMessage& message) override;
30 
31 protected:
32  // implementation of CGUIMediaWindow
33  void SetupShares() override;
34  bool OnClick(int iItem, const std::string& player = "") override;
35  void GetContextButtons(int itemNumber, CContextButtons& buttons) override;
36  bool OnContextButton(int itemNumber, CONTEXT_BUTTON button) override;
37  bool OnAddMediaSource() override;
38  bool GetDirectory(const std::string& strDirectory, CFileItemList& items) override;
39  std::string GetStartFolder(const std::string& dir) override;
40 
41  bool OnClickMsg(int controlId, int actionId);
42  void OnItemInfo(int itemNumber);
43  bool PlayGame(const CFileItem& item);
44 
45  CGUIDialogProgress* m_dlgProgress = nullptr;
46 };
47 } // namespace GAME
48 } // namespace KODI
bool OnMessage(CGUIMessage &message) override
Definition: GUIWindowGames.cpp:46
bool OnClick(int iItem, const std::string &player="") override
On click.
Definition: GUIWindowGames.cpp:139
Represents a list of files.
Definition: FileItem.h:721
bool GetDirectory(const std::string &strDirectory, CFileItemList &items) override
Overwrite to fill fileitems from a source.
Definition: GUIWindowGames.cpp:241
void OnItemInfo(int itemNumber)
Definition: GUIWindowGames.cpp:312
std::string GetStartFolder(const std::string &dir) override
Translate the folder to start in from the given quick path.
Definition: GUIWindowGames.cpp:283
Definition: AudioDecoder.h:18
Definition: GUIWindowGames.h:22
Definition: GUIMessage.h:365
Definition: GUIDialogProgress.h:16
Definition: GUIMediaWindow.h:28
Definition: GUIDialogContextMenu.h:92
Represents a file on a share.
Definition: FileItem.h:102