Mir
display_group.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2015 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser 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 Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Cemil Azizoglu <cemil.azizoglu@canonical.com>
17  *
18  */
19 
20 #ifndef MIR_GRAPHICS_X_DISPLAY_GROUP_H_
21 #define MIR_GRAPHICS_X_DISPLAY_GROUP_H_
22 
23 #include "mir_toolkit/common.h"
24 #include "mir/graphics/display.h"
25 #include "display_buffer.h"
26 
27 namespace mir
28 {
29 namespace graphics
30 {
31 namespace X
32 {
33 
35 {
36 public:
37  DisplayGroup(std::unique_ptr<DisplayBuffer> primary_buffer);
38 
39  void for_each_display_buffer(std::function<void(graphics::DisplayBuffer&)> const& f) override;
40  void post() override;
41  std::chrono::milliseconds recommended_sleep() const override;
42  void set_orientation(MirOrientation orientation);
43 
44 private:
45  std::unique_ptr<DisplayBuffer> display_buffer;
46 };
47 
48 }
49 }
50 }
51 
52 #endif /* MIR_GRAPHICS_X_DISPLAY_GROUP_H_ */
All things Mir.
Definition: atomic_callback.h:25
Interface to an output framebuffer.
Definition: display_buffer.h:47
void post() override
Post the content of the DisplayBuffers associated with this DisplaySyncGroup.
DisplayGroup(std::unique_ptr< DisplayBuffer > primary_buffer)
DisplaySyncGroup represents a group of displays that need to be output in unison as a single post() c...
Definition: display.h:55
void for_each_display_buffer(std::function< void(graphics::DisplayBuffer &)> const &f) override
MirOrientation
Direction relative to the "natural" orientation of the display.
Definition: common.h:164
std::chrono::milliseconds recommended_sleep() const override
Returns a recommendation to the compositor as to how long it should wait before sampling the scene fo...
void set_orientation(MirOrientation orientation)
detail::IntWrapper< struct XTag > X
Definition: dimensions.h:111
Definition: display_group.h:34

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016