2015-10-30 17:45:51 +01:00
|
|
|
/* This file is part of Clementine.
|
|
|
|
Copyright 2015, John Maguire <john.maguire@gmail.com>
|
2015-12-10 07:43:52 +01:00
|
|
|
Copyright 2015, Arun Narayanankutty <n.arun.lifescience@gmail.com>
|
2015-10-30 17:45:51 +01:00
|
|
|
|
|
|
|
Clementine is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Clementine is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2015-12-10 07:43:52 +01:00
|
|
|
#ifndef WINDOWSIDLEHANDLER_H
|
|
|
|
#define WINDOWSIDLEHANDLER_H
|
2015-10-30 17:45:51 +01:00
|
|
|
|
2015-12-10 07:43:52 +01:00
|
|
|
#include "idlehandler.h"
|
2015-10-30 17:45:51 +01:00
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
2015-12-10 07:43:52 +01:00
|
|
|
class WindowsIdleHandler : public IdleHandler {
|
2015-10-30 17:45:51 +01:00
|
|
|
public:
|
2015-12-10 07:43:52 +01:00
|
|
|
WindowsIdleHandler();
|
2015-10-30 17:45:51 +01:00
|
|
|
|
2015-12-10 07:43:52 +01:00
|
|
|
void Inhibit(const char*) override;
|
2015-10-30 17:45:51 +01:00
|
|
|
void Uninhibit() override;
|
2015-12-10 07:43:52 +01:00
|
|
|
bool Isinhibited() override;
|
2015-10-30 17:45:51 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
EXECUTION_STATE previous_state_;
|
2015-12-10 14:15:30 +01:00
|
|
|
bool is_inhibit_;
|
2015-10-30 17:45:51 +01:00
|
|
|
};
|
|
|
|
|
2015-12-10 07:43:52 +01:00
|
|
|
#endif // WINDOWSIDLEHANDLER_H
|