Revert "[Tizen] Add DALi Autofill implementation"
[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                                                 bool matchSystemLanguageDirection,
51                                                 LayoutDirection::Type layoutDirection )
52 {
53   return GetImplementation( *this ).CreateInfo( paragraph,
54                                                 numberOfCharacters,
55                                                 matchSystemLanguageDirection,
56                                                 layoutDirection );
57 }
58
59 void BidirectionalSupport::DestroyInfo( BidiInfoIndex bidiInfoIndex )
60 {
61   GetImplementation( *this ).DestroyInfo( bidiInfoIndex );
62 }
63
64 void BidirectionalSupport::Reorder( BidiInfoIndex bidiInfoIndex,
65                                     CharacterIndex firstCharacterIndex,
66                                     Length numberOfCharacters,
67                                     CharacterIndex* visualToLogicalMap )
68 {
69   GetImplementation( *this ).Reorder( bidiInfoIndex,
70                                       firstCharacterIndex,
71                                       numberOfCharacters,
72                                       visualToLogicalMap );
73 }
74
75 bool BidirectionalSupport::GetMirroredText( Character* text,
76                                             CharacterDirection* directions,
77                                             Length numberOfCharacters )
78 {
79   return GetImplementation( *this ).GetMirroredText( text,
80                                                      directions,
81                                                      numberOfCharacters );
82 }
83
84 bool BidirectionalSupport::GetParagraphDirection( BidiInfoIndex bidiInfoIndex ) const
85 {
86   return GetImplementation( *this ).GetParagraphDirection( bidiInfoIndex );
87 }
88
89 void BidirectionalSupport::GetCharactersDirection( BidiInfoIndex bidiInfoIndex,
90                                                    CharacterDirection* directions,
91                                                    Length numberOfCharacters )
92 {
93   GetImplementation( *this ).GetCharactersDirection( bidiInfoIndex,
94                                                      directions,
95                                                      numberOfCharacters );
96 }
97
98 } // namespace TextAbstraction
99
100 } // namespace Dali