| 1 |
/* |
| 2 |
* Copyright (C) 2005-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 "guilib/GUIDialog.h" |
| 12 |
|
| 13 |
#include <memory> |
| 14 |
|
| 15 |
namespace KODI |
| 16 |
{ |
| 17 |
namespace ADDONS |
| 18 |
{ |
| 19 |
class CScreenSaver; |
| 20 |
} // namespace ADDONS |
| 21 |
} // namespace KODI |
| 22 |
|
| 23 |
class CGUIWindowScreensaver : public CGUIDialog |
| 24 |
{ |
| 25 |
public: |
| 26 |
CGUIWindowScreensaver(); |
| 27 |
|
| 28 |
bool OnMessage(CGUIMessage& message) override; |
| 29 |
bool OnAction(const CAction& action) override |
| 30 |
{ |
| 31 |
// We're just a screen saver, nothing to do here |
| 32 |
return false; |
| 33 |
} |
| 34 |
void Render() override; |
| 35 |
void Process(unsigned int currentTime, CDirtyRegionList& regions) override; |
| 36 |
|
| 37 |
protected: |
| 38 |
void UpdateVisibility() override; |
| 39 |
void OnInitWindow() override; |
| 40 |
|
| 41 |
private: |
| 42 |
std::unique_ptr<KODI::ADDONS::CScreenSaver> m_addon; |
| 43 |
bool m_visible{false}; |
| 44 |
}; |