Mir
decoration_provider.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016-2018 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 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 
17 #ifndef MIRAL_SHELL_DECORATION_PROVIDER_H
18 #define MIRAL_SHELL_DECORATION_PROVIDER_H
19 
20 
22 #include <mir/fd.h>
23 
24 #include <mutex>
25 
27 {
28 public:
31 
32  void operator()(struct wl_display* display);
33  void operator()(std::weak_ptr<mir::scene::Session> const& session);
34 
35  auto session() const -> std::shared_ptr<mir::scene::Session>;
36 
37  void stop();
38 
39  bool is_decoration(miral::Window const& window) const;
40 
41 private:
42  mir::Fd const shutdown_signal;
43 
44  std::mutex mutable mutex;
45  std::weak_ptr<mir::scene::Session> weak_session;
46 };
47 
48 
49 #endif //MIRAL_SHELL_DECORATION_PROVIDER_H
Definition: decoration_provider.h:27
bool is_decoration(miral::Window const &window) const
Definition: decoration_provider.cpp:452
auto session() const -> std::shared_ptr< mir::scene::Session >
Definition: decoration_provider.cpp:446
DecorationProvider()
Definition: decoration_provider.cpp:367
void operator()(struct wl_display *display)
Definition: decoration_provider.cpp:391
void stop()
Definition: decoration_provider.cpp:379
Definition: splash_session.h:22
Mir Abstraction Layer.
Definition: floating_window_manager.h:29

Copyright © 2012-2022 Canonical Ltd.
Generated on Tue May 24 14:35:34 UTC 2022
This documentation is licensed under the GPL version 2 or 3.