[AT-SPI] Support for hidden text added
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / image-visual-shader-factory.h
1 #ifndef DALI_TOOLKIT_IMAGE_VISUAL_SHADER_FACTORY_H
2 #define DALI_TOOLKIT_IMAGE_VISUAL_SHADER_FACTORY_H
3
4 /*
5  * Copyright (c) 2021 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 // EXTERNAL INCLUDES
21
22 // INTERNAL INCLUDES
23 #include <dali-toolkit/internal/visuals/visual-factory-cache.h>
24 #include <string_view>
25
26 namespace Dali
27 {
28 namespace Toolkit
29 {
30 namespace Internal
31 {
32 /**
33  * @brief Whether use texture with atlas, or not
34  */
35 enum class TextureAtlas
36 {
37   DISABLED = 0, ///< Image visual use ATLAS
38   ENABLED       ///< Image visual doesn't use ATLAS
39 };
40
41 /**
42  * @brief Whether apply to texture wraping in default, or not
43  */
44 enum class DefaultTextureWrapMode
45 {
46   DO_NOT_APPLY = 0, ///< Image visual doesn't apply to wraping texture in default
47   APPLY             ///< Image visual apply to wraping texture in default
48 };
49
50 /**
51  * @brief Whether use rounded corner, or not
52  */
53 enum class RoundedCorner
54 {
55   DISABLED = 0, ///< Image visual doesn't use rounded corner
56   ENABLED       ///< Image visual use rounded corner
57 };
58
59 /**
60  * @brief Whether use borderline, or not
61  */
62 enum class Borderline
63 {
64   DISABLED = 0, ///< Image visual doesn't use borderline
65   ENABLED       ///< Image visual use borderline
66 };
67
68 /**
69  * ImageVisualShaderFactory is an object that provides and shares shaders between image visuals
70  */
71 class ImageVisualShaderFactory
72 {
73 public:
74
75   /**
76    * @brief Constructor
77    */
78   ImageVisualShaderFactory();
79
80   /**
81    * @brief Destructor
82    */
83   ~ImageVisualShaderFactory();
84
85   /**
86    * Get the standard image rendering shader.
87    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
88    * @param[in] atlasing Whether texture atlasing is applied.
89    * @param[in] defaultTextureWrapping Whether the default texture wrap mode is applied.
90    * @param[in] roundedCorner Whether the rounded corder is applied.
91    * @param[in] borderline Whether the borderline of visual is applied.
92    */
93   Shader GetShader(VisualFactoryCache& factoryCache, TextureAtlas atlasing, DefaultTextureWrapMode defaultTextureWrapping, RoundedCorner roundedCorner, Borderline borderline);
94
95   /**
96    * Request the default vertex shader source.
97    * @return The default vertex shader source.
98    */
99   std::string_view GetVertexShaderSource();
100
101   /**
102    * Request the default fragment shader source.
103    * @return The default fragment shader source.
104    */
105   std::string_view GetFragmentShaderSource();
106
107 protected:
108   /**
109    * Undefined copy constructor.
110    */
111   ImageVisualShaderFactory(const ImageVisualShaderFactory&);
112
113   /**
114    * Undefined assignment operator.
115    */
116   ImageVisualShaderFactory& operator=(const ImageVisualShaderFactory& rhs);
117
118 private:
119 };
120
121 } // namespace Internal
122
123 } // namespace Toolkit
124
125 } // namespace Dali
126
127 #endif // DALI_TOOLKIT_IMAGE_VISUAL_SHADER_FACTORY_H