Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
native_platform.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 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: Eleni Maria Stea <elenimaria.stea@canonical.com>
17  */
18 #ifndef MIR_GRAPHICS_NATIVE_PLATFORM_H_
19 #define MIR_GRAPHICS_NATIVE_PLATFORM_H_
20 
21 #include "mir/graphics/platform.h"
23 #include <memory>
24 #include <functional>
25 
26 namespace mir
27 {
28 namespace options
29 {
30 class Option;
31 }
32 namespace graphics
33 {
34 class GraphicBufferAllocator;
35 class BufferInitializer;
36 class PlatformIPCPackage;
37 class InternalClient;
38 class BufferIpcMessage;
39 class Buffer;
40 class BufferWriter;
41 class DisplayReport;
42 class NestedContext;
43 
45 {
46 public:
48 
49  virtual void initialize(std::shared_ptr<NestedContext> const& nested_context) = 0;
50 
51  virtual std::shared_ptr<GraphicBufferAllocator> create_buffer_allocator(
52  std::shared_ptr<BufferInitializer> const& buffer_initializer) = 0;
53 
54  virtual std::shared_ptr<PlatformIPCPackage> connection_ipc_package() = 0;
55 
56  virtual std::shared_ptr<InternalClient> create_internal_client() = 0;
57 
58  virtual void fill_buffer_package(
59  BufferIpcMessage* message,
60  Buffer const* buffer,
61  BufferIpcMsgType msg_type) const = 0;
62 
63  virtual std::shared_ptr<BufferWriter> make_buffer_writer() = 0;
64 
65  virtual ~NativePlatform() = default;
66  NativePlatform(NativePlatform const&) = delete;
67  NativePlatform& operator=(NativePlatform const&) = delete;
68 };
69 
70 extern "C" typedef std::shared_ptr<NativePlatform>(*CreateNativePlatform)(std::shared_ptr<DisplayReport> const& report);
71 extern "C" std::shared_ptr<NativePlatform> create_native_platform(std::shared_ptr<DisplayReport> const& report);
72 }
73 }
74 
75 #endif // MIR_GRAPHICS_NATIVE_PLATFORM_H_
NativePlatform()
Definition: native_platform.h:47
All things Mir.
Definition: aging_buffer.h:24
virtual std::shared_ptr< InternalClient > create_internal_client()=0
BufferIpcMsgType
Definition: platform_ipc_operations.h:28
virtual std::shared_ptr< GraphicBufferAllocator > create_buffer_allocator(std::shared_ptr< BufferInitializer > const &buffer_initializer)=0
Definition: buffer_ipc_message.h:32
Definition: native_platform.h:44
virtual std::shared_ptr< PlatformIPCPackage > connection_ipc_package()=0
std::shared_ptr< NativePlatform > create_native_platform(std::shared_ptr< DisplayReport > const &report)
virtual void fill_buffer_package(BufferIpcMessage *message, Buffer const *buffer, BufferIpcMsgType msg_type) const =0
virtual void initialize(std::shared_ptr< NestedContext > const &nested_context)=0
virtual ~NativePlatform()=default
virtual std::shared_ptr< BufferWriter > make_buffer_writer()=0
NativePlatform & operator=(NativePlatform const &)=delete
Definition: buffer.h:34

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Oct 10 14:07:14 UTC 2014