Mir
host_connection.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: Eleni Maria Stea <elenimaria.stea@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_NESTED_HOST_CONNECTION_H_
20 #define MIR_GRAPHICS_NESTED_HOST_CONNECTION_H_
21 
24 
25 #include <memory>
26 #include <vector>
27 #include <functional>
28 
29 #include <EGL/egl.h>
30 
31 namespace mir
32 {
33 namespace graphics
34 {
35 class CursorImage;
36 
37 namespace nested
38 {
39 class HostSurface;
41 {
42 public:
43  virtual ~HostConnection() = default;
44 
45  virtual EGLNativeDisplayType egl_native_display() = 0;
46  virtual std::shared_ptr<MirDisplayConfiguration> create_display_config() = 0;
47  virtual void set_display_config_change_callback(std::function<void()> const& cb) = 0;
49  virtual std::shared_ptr<HostSurface> create_surface(
50  int width, int height, MirPixelFormat pf, char const* name,
51  MirBufferUsage usage, uint32_t output_id) = 0;
52 
53  virtual void set_cursor_image(CursorImage const& image) = 0;
54  virtual void hide_cursor() = 0;
55 
56 protected:
57  HostConnection() = default;
58  HostConnection(HostConnection const&) = delete;
59  HostConnection& operator=(HostConnection const&) = delete;
60 };
61 
62 }
63 }
64 }
65 #endif // MIR_GRAPHICS_NESTED_HOST_CONNECTION_H_
virtual void set_display_config_change_callback(std::function< void()> const &cb)=0
All things Mir.
Definition: atomic_callback.h:25
Definition: client_types.h:289
Definition: nested_context.h:32
virtual std::shared_ptr< MirDisplayConfiguration > create_display_config()=0
virtual void apply_display_config(MirDisplayConfiguration &)=0
Definition: host_connection.h:40
Definition: cursor_image.h:30
virtual EGLNativeDisplayType egl_native_display()=0
unsigned int width
Definition: black_arrow.c:4
virtual void set_cursor_image(CursorImage const &image)=0
MirBufferUsage
MirBufferUsage specifies how a surface can and will be used.
Definition: client_types.h:147
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:134
unsigned int height
Definition: black_arrow.c:5
virtual std::shared_ptr< HostSurface > create_surface(int width, int height, MirPixelFormat pf, char const *name, MirBufferUsage usage, uint32_t output_id)=0
HostConnection & operator=(HostConnection const &)=delete

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015