Merge branch 'devel/master' into devel/vulkan
[platform/core/uifw/dali-core.git] / dali / graphics-api / graphics-api-controller.h
1 #ifndef DALI_GRAPHICS_API_CONTROLLER_H
2 #define DALI_GRAPHICS_API_CONTROLLER_H
3
4 /*
5  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 #include <dali/graphics-api/graphics-api-accessor.h>
22 #include <dali/graphics-api/graphics-api-base-factory.h>
23 #include <dali/graphics-api/graphics-api-dynamic-buffer.h>
24 #include <dali/graphics-api/graphics-api-framebuffer.h>
25 #include <dali/graphics-api/graphics-api-sampler.h>
26 #include <dali/graphics-api/graphics-api-shader.h>
27 #include <dali/graphics-api/graphics-api-static-buffer.h>
28 #include <dali/graphics-api/graphics-api-texture-set.h>
29 #include <dali/graphics-api/graphics-api-texture.h>
30 #include <dali/graphics-api/graphics-api-texture-factory.h>
31
32 namespace Dali
33 {
34 namespace Graphics
35 {
36 namespace API
37 {
38
39 /**
40  * @brief Interface class for Manager types in the graphics API.
41  */
42 class Controller
43 {
44 public:
45   /**
46    * @brief Create a new object
47    */
48   virtual Accessor< Shader > CreateShader(const BaseFactory< Shader >& factory) = 0;
49
50   /**
51    * @brief Create a new object
52    */
53   virtual Accessor< Texture > CreateTexture(const BaseFactory< Texture >& factory) = 0;
54
55   /**
56    * @brief Create a new object
57    */
58   virtual Accessor< TextureSet > CreateTextureSet(const BaseFactory< TextureSet >& factory) = 0;
59
60   /**
61    * @brief Create a new object
62    */
63   virtual Accessor< DynamicBuffer > CreateDynamicBuffer(
64       const BaseFactory< DynamicBuffer >& factory) = 0;
65
66   /**
67    * @brief Create a new object
68    */
69   virtual Accessor< StaticBuffer > CreateStaticBuffer(
70       const BaseFactory< StaticBuffer >& factory) = 0;
71
72   /**
73    * @brief Create a new object
74    */
75   virtual Accessor< Sampler > CreateSampler(const BaseFactory< Sampler >& factory) = 0;
76
77   /**
78    * @brief Create a new object
79    */
80   virtual Accessor< Framebuffer > CreateFramebuffer(const BaseFactory< Framebuffer >& factory) = 0;
81
82   /**
83    * @brief Get a render list
84    */
85   virtual void GetRenderItemList() = 0;
86
87 public:
88   // not copyable
89   Controller(const Controller&) = delete;
90   Controller& operator=(const Controller&) = delete;
91
92   virtual ~Controller() = default;
93
94 protected:
95   // derived types should not be moved direcly to prevent slicing
96   Controller(Controller&&) = default;
97   Controller& operator=(Controller&&) = default;
98
99   /**
100    * Objects of this type should not directly.
101    */
102   Controller() = default;
103 };
104
105 } // namespace API
106 } // namespace Graphics
107 } // namespace Dali
108
109 #endif // DALI_GRAPHICS_API_CONTROLLER_H