Revert "[Tizen] Support custom fonts registration"
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / text-abstraction / bidirectional-support.cpp
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/devel-api/text-abstraction/bidirectional-support.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/text/text-abstraction/bidirectional-support-impl.h>
23
24 namespace Dali
25 {
26
27 namespace TextAbstraction
28 {
29
30 BidirectionalSupport::BidirectionalSupport()
31 {
32 }
33
34 BidirectionalSupport::~BidirectionalSupport()
35 {
36 }
37
38 BidirectionalSupport::BidirectionalSupport( Internal::BidirectionalSupport* implementation )
39 : BaseHandle( implementation )
40 {
41 }
42
43 BidirectionalSupport BidirectionalSupport::Get()
44 {
45   return Internal::BidirectionalSupport::Get();
46 }
47
48 BidiInfoIndex BidirectionalSupport::CreateInfo( const Character* const paragraph,
49                                                 Length numberOfCharacters )
50 {
51   return GetImplementation( *this ).CreateInfo( paragraph,
52                                                 numberOfCharacters );
53 }
54
55 void BidirectionalSupport::DestroyInfo( BidiInfoIndex bidiInfoIndex )
56 {
57   GetImplementation( *this ).DestroyInfo( bidiInfoIndex );
58 }
59
60 void BidirectionalSupport::Reorder( BidiInfoIndex bidiInfoIndex,
61                                     CharacterIndex firstCharacterIndex,
62                                     Length numberOfCharacters,
63                                     CharacterIndex* visualToLogicalMap )
64 {
65   GetImplementation( *this ).Reorder( bidiInfoIndex,
66                                       firstCharacterIndex,
67                                       numberOfCharacters,
68                                       visualToLogicalMap );
69 }
70
71 bool BidirectionalSupport::GetMirroredText( Character* text,
72                                             CharacterDirection* directions,
73                                             Length numberOfCharacters )
74 {
75   return GetImplementation( *this ).GetMirroredText( text,
76                                                      directions,
77                                                      numberOfCharacters );
78 }
79
80 bool BidirectionalSupport::GetParagraphDirection( BidiInfoIndex bidiInfoIndex ) const
81 {
82   return GetImplementation( *this ).GetParagraphDirection( bidiInfoIndex );
83 }
84
85 void BidirectionalSupport::GetCharactersDirection( BidiInfoIndex bidiInfoIndex,
86                                                    CharacterDirection* directions,
87                                                    Length numberOfCharacters )
88 {
89   GetImplementation( *this ).GetCharactersDirection( bidiInfoIndex,
90                                                      directions,
91                                                      numberOfCharacters );
92 }
93
94 } // namespace TextAbstraction
95
96 } // namespace Dali