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  * Authored by: Alan Griffiths <alan@octopull.co.uk>
17  */
18 
19 #ifndef MIRAL_SHELL_DECORATION_PROVIDER_H
20 #define MIRAL_SHELL_DECORATION_PROVIDER_H
21 
22 
24 #include <mir/fd.h>
25 
26 #include <mutex>
27 
29 {
30 public:
33 
34  void operator()(struct wl_display* display);
35  void operator()(std::weak_ptr<mir::scene::Session> const& session);
36 
37  auto session() const -> std::shared_ptr<mir::scene::Session>;
38 
39  void stop();
40 
41  bool is_decoration(miral::Window const& window) const;
42 
43 private:
44  mir::Fd const shutdown_signal;
45 
46  std::mutex mutable mutex;
47  std::weak_ptr<mir::scene::Session> weak_session;
48 };
49 
50 
51 #endif //MIRAL_SHELL_DECORATION_PROVIDER_H
Definition: decoration_provider.h:29
bool is_decoration(miral::Window const &window) const
Definition: decoration_provider.cpp:442
auto session() const -> std::shared_ptr< mir::scene::Session >
Definition: decoration_provider.cpp:436
DecorationProvider()
Definition: decoration_provider.cpp:359
void operator()(struct wl_display *display)
Definition: decoration_provider.cpp:383
void stop()
Definition: decoration_provider.cpp:371
Definition: splash_session.h:24
Mir Abstraction Layer.
Definition: floating_window_manager.h:31

Copyright © 2012-2021 Canonical Ltd.
Generated on Wed Mar 31 15:54:02 UTC 2021
This documentation is licensed under the GPL version 2 or 3.