Mir
stub_server_platform_factory.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 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 2 or 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: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
17  */
18 
19 #ifndef MIR_TEST_FRAMEWORK_STUB_SERVER_PLATFORM_FACTORY_
20 #define MIR_TEST_FRAMEWORK_STUB_SERVER_PLATFORM_FACTORY_
21 
22 #include "mir/geometry/rectangle.h"
23 
24 #include "mir/graphics/platform.h"
25 #include "mir/module_deleter.h"
26 #include <vector>
27 #include <memory>
28 #include <string>
29 
30 namespace mir
31 {
32 namespace input
33 {
34 struct InputDeviceInfo;
35 }
36 }
37 
38 namespace mir_test_framework
39 {
40 class FakeInputDevice;
41 
42 std::shared_ptr<mir::graphics::Platform> make_stubbed_server_graphics_platform(std::vector<mir::geometry::Rectangle> const& display_rects);
43 
44 void set_next_display_rects(std::unique_ptr<std::vector<mir::geometry::Rectangle>>&& display_rects);
45 
46 void set_next_preset_display(std::shared_ptr<mir::graphics::Display> const& display);
47 
48 mir::UniqueModulePtr<FakeInputDevice> add_fake_input_device(mir::input::InputDeviceInfo const& info);
49 
50 void disable_flavors();
51 
52 }
53 #endif /* MIR_TEST_FRAMEWORK_STUB_SERVER_PLATFORM_FACTORY_ */
AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time...
Definition: blob.h:26
void set_next_preset_display(std::shared_ptr< mir::graphics::Display > const &display)
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)
std::shared_ptr< mir::graphics::Platform > make_stubbed_server_graphics_platform(std::vector< mir::geometry::Rectangle > const &display_rects)
void set_next_display_rects(std::unique_ptr< std::vector< mir::geometry::Rectangle >> &&display_rects)

Copyright © 2012-2018 Canonical Ltd.
Generated on Sat Mar 31 14:22:42 UTC 2018