Mir
observant_shell.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
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_OBSERVANT_SHELL_H_
20 #define MIR_TEST_OBSERVANT_SHELL_H_
21 
22 #include "mir/shell/shell_wrapper.h"
23 
24 namespace mir { namespace scene { class SurfaceObserver; }}
25 
26 namespace mir_test_framework
27 {
28 struct ObservantShell : mir::shell::ShellWrapper
29 {
31  std::shared_ptr<mir::shell::Shell> const& wrapped,
32  std::shared_ptr<mir::scene::SurfaceObserver> const& surface_observer);
33 
34  mir::frontend::SurfaceId create_surface(
35  std::shared_ptr<mir::scene::Session> const& session,
36  mir::scene::SurfaceCreationParameters const& params,
37  std::shared_ptr<mir::frontend::EventSink> const& sink) override;
38 
39 private:
40  std::shared_ptr<mir::scene::SurfaceObserver> const surface_observer;
41 };
42 }
43 
44 #endif /* MIR_TEST_OBSERVANT_SHELL_H_ */
AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time...
Definition: blob.h:26
Definition: observant_shell.h:28
Definition: int_wrapper.h:27
Definition: any_surface.h:25

Copyright © 2012-2018 Canonical Ltd.
Generated on Thu Apr 5 15:26:05 UTC 2018