| 1 |
/* |
| 2 |
* Copyright (C) 2017-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 "../OSScreenSaver.h" |
| 12 |
#include "Connection.h" |
| 13 |
|
| 14 |
#include <wayland-extra-protocols.hpp> |
| 15 |
|
| 16 |
namespace KODI |
| 17 |
{ |
| 18 |
namespace WINDOWING |
| 19 |
{ |
| 20 |
namespace WAYLAND |
| 21 |
{ |
| 22 |
|
| 23 |
class COSScreenSaverIdleInhibitUnstableV1 : public IOSScreenSaver |
| 24 |
{ |
| 25 |
public: |
| 26 |
COSScreenSaverIdleInhibitUnstableV1(wayland::zwp_idle_inhibit_manager_v1_t const& manager, wayland::surface_t const& inhibitSurface); |
| 27 |
static COSScreenSaverIdleInhibitUnstableV1* TryCreate(CConnection& connection, wayland::surface_t const& inhibitSurface); |
| 28 |
void Inhibit() override; |
| 29 |
void Uninhibit() override; |
| 30 |
|
| 31 |
private: |
| 32 |
wayland::zwp_idle_inhibit_manager_v1_t m_manager; |
| 33 |
wayland::zwp_idle_inhibitor_v1_t m_inhibitor; |
| 34 |
wayland::surface_t m_surface; |
| 35 |
}; |
| 36 |
|
| 37 |
} |
| 38 |
} |
| 39 |
} |