Merge branch 'devel/master' into devel/graphics
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / rendering / text-backend.h
1 #ifndef DALI_TOOLKIT_TEXT_BACKEND_H
2 #define DALI_TOOLKIT_TEXT_BACKEND_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
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/base-handle.h>
23
24 // INTERNAL INCLUDES
25 #include <dali-toolkit/internal/text/rendering/text-renderer.h>
26
27 namespace Dali
28 {
29 namespace Toolkit
30 {
31 namespace Text
32 {
33 namespace Internal DALI_INTERNAL
34 {
35 class Backend;
36 }
37
38 /**
39  * @brief Provides access to different text rendering backends.
40  */
41 class Backend : public BaseHandle
42 {
43 public:
44   /**
45    * @brief Retrieve a handle to the Backend instance.
46    *
47    * @return A handle to the Backend
48    */
49   static Backend Get();
50
51   /**
52    * @brief Create a renderer from a particluar rendering type.
53    *
54    * @param[in] renderingType The type of rendering required.
55    * @return A handle to the newly created renderer.
56    */
57   RendererPtr NewRenderer(unsigned int renderingType);
58
59   /**
60    * @brief Create an uninitialized TextAbstraction handle.
61    */
62   Backend();
63
64   /**
65    * @brief Destructor
66    *
67    * This is non-virtual since derived Handle types must not contain data or virtual methods.
68    */
69   ~Backend();
70
71   /**
72    * @brief This copy constructor is required for (smart) pointer semantics.
73    *
74    * @param[in] handle A reference to the copied handle.
75    */
76   Backend(const Backend& handle);
77
78   /**
79    * @brief This assignment operator is required for (smart) pointer semantics.
80    *
81    * @param [in] handle  A reference to the copied handle.
82    * @return A reference to this.
83    */
84   Backend& operator=(const Backend& handle);
85
86 public: // Not intended for application developers
87   /**
88    * @brief This constructor is used by Backend::Get().
89    *
90    * @param[in] backend A pointer to the internal backend object.
91    */
92   explicit DALI_INTERNAL Backend(Internal::Backend* backend);
93 };
94
95 } // namespace Text
96
97 } // namespace Toolkit
98
99 } // namespace Dali
100
101 #endif // DALI_TOOLKIT_TEXT_BACKEND_H