Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 <memory>
22 #include <functional>
23 
24 namespace mir
25 {
26 namespace options
27 {
28 class Option;
29 }
30 namespace graphics
31 {
32 class GraphicBufferAllocator;
33 class BufferInitializer;
34 class PlatformIPCPackage;
35 class InternalClient;
36 class BufferIPCPacker;
37 class Buffer;
38 class DisplayReport;
39 class NestedContext;
40 
42 {
43 public:
45 
46  virtual void initialize(std::shared_ptr<NestedContext> const& nested_context) = 0;
47 
48  virtual std::shared_ptr<GraphicBufferAllocator> create_buffer_allocator(
49  std::shared_ptr<BufferInitializer> const& buffer_initializer) = 0;
50 
51  virtual std::shared_ptr<PlatformIPCPackage> get_ipc_package() = 0;
52 
53  virtual std::shared_ptr<InternalClient> create_internal_client() = 0;
54 
55  virtual void fill_ipc_package(BufferIPCPacker* packer, Buffer const* buffer) const = 0;
56 
57  virtual ~NativePlatform() = default;
58  NativePlatform(NativePlatform const&) = delete;
59  NativePlatform& operator=(NativePlatform const&) = delete;
60 };
61 
62 extern "C" typedef std::shared_ptr<NativePlatform>(*CreateNativePlatform)(std::shared_ptr<DisplayReport> const& report);
63 extern "C" std::shared_ptr<NativePlatform> create_native_platform(std::shared_ptr<DisplayReport> const& report);
64 }
65 }
66 
67 #endif // MIR_GRAPHICS_NATIVE_PLATFORM_H_
NativePlatform()
Definition: native_platform.h:44
virtual std::shared_ptr< InternalClient > create_internal_client()=0
virtual void fill_ipc_package(BufferIPCPacker *packer, Buffer const *buffer) const =0
virtual std::shared_ptr< GraphicBufferAllocator > create_buffer_allocator(std::shared_ptr< BufferInitializer > const &buffer_initializer)=0
Definition: native_platform.h:41
input_rectangles report(report)
std::shared_ptr< NativePlatform > create_native_platform(std::shared_ptr< DisplayReport > const &report)
virtual void initialize(std::shared_ptr< NestedContext > const &nested_context)=0
virtual ~NativePlatform()=default
virtual std::shared_ptr< PlatformIPCPackage > get_ipc_package()=0
NativePlatform & operator=(NativePlatform const &)=delete
Definition: buffer_ipc_packer.h:30
Definition: buffer.h:34

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