Mir
input_device_faker.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2017 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 3,
6  * as 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: Alan Griffiths <alan@octopull.co.uk>
17  */
18 
19 #ifndef MIR_TEST_FRAMEWORK_INPUT_DEVICE_FAKER_H_
20 #define MIR_TEST_FRAMEWORK_INPUT_DEVICE_FAKER_H_
21 
22 #include <mir/module_deleter.h>
23 
24 namespace mir { class Server; }
25 namespace mir { namespace input { class InputDeviceInfo; } }
26 
27 namespace mir_test_framework
28 {
29 struct FakeInputDevice;
30 
32 {
33 public:
34  mir::UniqueModulePtr<FakeInputDevice> add_fake_input_device(mir::input::InputDeviceInfo const& info);
35 
36  void wait_for_input_devices_added_to(mir::Server& server);
37 
38 private:
39  int expected_number_of_input_devices = 0;
40 };
41 }
42 
43 #endif //MIR_TEST_FRAMEWORK_INPUT_DEVICE_FAKER_H_
AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time...
Definition: sw_splash.h:26
Definition: input_device_faker.h:31
Definition: any_surface.h:25
std::unique_ptr< T, ModuleDeleter< T > > UniqueModulePtr
Use UniqueModulePtr to ensure that your loadable libray outlives instances created within it...
Definition: module_deleter.h:83
mir::UniqueModulePtr< FakeInputDevice > add_fake_input_device(mir::input::InputDeviceInfo const &info)

Copyright © 2012-2018 Canonical Ltd.
Generated on Mon Feb 19 14:06:43 UTC 2018