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