dfc60d491cf2d08235ae24e113222c0d5d52ecdf
[platform/core/uifw/dali-core.git] / dali / devel-api / images / native-image-interface-extension.h
1 #ifndef __DALI_INTEGRATION_NATIVE_IMAGE_INTERFACE_EXTENSION_H__
2 #define __DALI_INTEGRATION_NATIVE_IMAGE_INTERFACE_EXTENSION_H__
3
4 /*
5  * Copyright (c) 2015 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/public-api/images/native-image-interface.h>
22
23 namespace Dali
24 {
25
26 /**
27  * @brief Extension abstract interface to provide platform-specific support for handling image data.
28  *
29  */
30 class NativeImageInterface::Extension
31 {
32 public:
33
34   class Extension2; ///< Forward declare future extension interface
35
36   /**
37    * @brief Get custom fragment prefix for rendering native image.
38    *
39    * @return Custom fragment prefix code as string.
40    */
41   virtual const char* GetCustomFragmentPreFix() = 0;
42
43   /**
44    * @brief Get custom sampler type name for rendering native image.
45    *
46    * @return Custom sampler type name.
47    */
48   virtual const char* GetCustomSamplerTypename() = 0;
49
50   /**
51    * @brief Get texture target for binding native image as texture.
52    *
53    * @return Texture target.
54    */
55   virtual int GetEglImageTextureTarget() = 0;
56
57   /**
58    * @brief Retrieve the extension for the interface.
59    *
60    * @return Extension2 pointer if available, NULL otherwise
61    */
62   virtual Extension2* GetExtension2()
63   {
64     return NULL;
65   }
66
67 protected:
68
69   /**
70    * @brief Destructor.
71    *
72    */
73   virtual ~Extension()
74   {
75   }
76
77 };
78
79 } // namespace Dali
80
81 #endif // __DALI_INTEGRATION_NATIVE_IMAGE_INTERFACE_H__