2
* Copyright © 2015 Canonical Ltd.
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Andreas Pokorny <andreas.pokorny@canonical.com>
19
#ifndef USC_TEST_MOCK_SCREEN_H_
20
#define USC_TEST_MOCK_SCREEN_H_
22
#include "src/screen.h"
24
#include <gtest/gtest.h>
25
#include <gmock/gmock.h>
31
struct MockScreen : usc::Screen
33
MOCK_METHOD1(enable_inactivity_timers, void(bool enable));
34
MOCK_METHOD0(keep_display_on_temporarily, void());
36
MOCK_METHOD0(get_screen_power_mode, MirPowerMode());
37
MOCK_METHOD2(set_screen_power_mode, void(MirPowerMode mode, PowerStateChangeReason reason));
38
MOCK_METHOD1(keep_display_on, void(bool on));
39
MOCK_METHOD1(set_brightness, void(int brightness));
40
MOCK_METHOD1(enable_auto_brightness, void(bool enable));
41
MOCK_METHOD2(set_inactivity_timeouts, void(int power_off_timeout, int dimmer_timeout));
43
MOCK_METHOD1(set_touch_visualization_enabled, void(bool enabled));
45
void register_power_state_change_handler(
46
usc::PowerStateChangeHandler const& handler)
48
power_state_change_handler = handler;
51
usc::PowerStateChangeHandler power_state_change_handler;