Mir
mock_seat_report.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016 Canonical Ltd.
3  *
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 2 or 3 as
6  * published by the Free Software Foundation.
7  *
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.
12  *
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/>.
15  *
16  * Authored by: Brandon Schaefer <brandon.schaefer@canonical.com>
17  */
18 
19 #ifndef MIR_TEST_DOUBLES_MOCK_SEAT_REPORT_H_
20 #define MIR_TEST_DOUBLES_MOCK_SEAT_REPORT_H_
21 
22 #include "mir/input/seat_observer.h"
23 #include <gmock/gmock.h>
24 
25 class MirEvent;
26 
27 namespace mir
28 {
29 namespace test
30 {
31 namespace doubles
32 {
33 
34 class MockSeatObserver : public input::SeatObserver
35 {
36 public:
37  MOCK_METHOD1(seat_add_device, void(uint64_t /*id*/));
38  MOCK_METHOD1(seat_remove_device, void(uint64_t /*id*/));
39  MOCK_METHOD1(seat_dispatch_event, void(std::shared_ptr<MirEvent const> const& /*event*/));
40  MOCK_METHOD2(seat_get_rectangle_for, void(uint64_t /*id*/, geometry::Rectangle const& /*out_rect*/));
41  MOCK_METHOD2(seat_set_key_state, void(uint64_t /*id*/, std::vector<uint32_t> const& /*scan_codes*/));
42  MOCK_METHOD2(seat_set_pointer_state, void(uint64_t /*id*/, unsigned /*buttons*/));
43  MOCK_METHOD2(seat_set_cursor_position, void(float /*cursor_x*/, float /*cursor_y*/));
44  MOCK_METHOD1(seat_set_confinement_region_called, void(geometry::Rectangles const& /*regions*/));
45  MOCK_METHOD0(seat_reset_confinement_regions, void());
46 };
47 
48 }
49 }
50 }
51 
52 #endif /* MIR_TEST_DOUBLES_MOCK_SEAT_REPORT_H_ */
AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time...
Definition: blob.h:26
MOCK_METHOD0(seat_reset_confinement_regions, void())
A collection of rectangles (with possible duplicates).
Definition: rectangles.h:34
MOCK_METHOD2(seat_get_rectangle_for, void(uint64_t, geometry::Rectangle const &))
Definition: mock_seat_report.h:34
struct MirEvent MirEvent
Definition: event.h:84
Definition: rectangle.h:33
MOCK_METHOD1(seat_add_device, void(uint64_t))

Copyright © 2012-2018 Canonical Ltd.
Generated on Thu Mar 15 13:06:27 UTC 2018