Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
bypass.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 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: Daniel van Vugt <daniel.van.vugt@canonical.com>
17  */
18 
19 #ifndef MIR_COMPOSITOR_BYPASS_H_
20 #define MIR_COMPOSITOR_BYPASS_H_
21 
22 #include "mir/compositor/scene.h"
23 
24 namespace mir
25 {
26 namespace graphics
27 {
28 class DisplayBuffer;
29 }
30 namespace compositor
31 {
32 
34 {
35 public:
36  BypassFilter(const graphics::DisplayBuffer &display_buffer);
37  bool operator()(const graphics::Renderable &) override;
38  bool fullscreen_on_top() const;
39 
40 private:
41  bool all_orthogonal = true;
42  bool topmost_fits = false;
43  const graphics::DisplayBuffer &display_buffer;
44 };
45 
47 {
48 public:
49  void operator()(const graphics::Renderable &) override;
51 
52 private:
53  // This has to be a pointer. We have no control over Renderable lifetime
54  const graphics::Renderable *latest = nullptr;
55 };
56 
57 } // namespace compositor
58 } // namespace mir
59 
60 #endif // MIR_COMPOSITOR_BYPASS_H_
Interface to an output framebuffer.
Definition: display_buffer.h:39
Definition: scene.h:34
const graphics::Renderable * topmost_fullscreen() const
Definition: bypass.cpp:77
Definition: bypass.h:46
bool operator()(const graphics::Renderable &) override
Definition: bypass.cpp:32
Definition: renderable.h:33
void operator()(const graphics::Renderable &) override
Definition: bypass.cpp:72
BypassFilter(const graphics::DisplayBuffer &display_buffer)
Definition: bypass.cpp:27
Definition: bypass.h:33
Definition: scene.h:47
bool fullscreen_on_top() const
Definition: bypass.cpp:67

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Apr 11 21:14:53 UTC 2014