2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/devel-api/text-abstraction/bidirectional-support.h>
22 #include <dali/internal/text/text-abstraction/bidirectional-support-impl.h>
27 namespace TextAbstraction
30 BidirectionalSupport::BidirectionalSupport()
34 BidirectionalSupport::~BidirectionalSupport()
38 BidirectionalSupport::BidirectionalSupport( Internal::BidirectionalSupport* implementation )
39 : BaseHandle( implementation )
43 BidirectionalSupport BidirectionalSupport::Get()
45 return Internal::BidirectionalSupport::Get();
48 BidiInfoIndex BidirectionalSupport::CreateInfo( const Character* const paragraph,
49 Length numberOfCharacters )
51 return GetImplementation( *this ).CreateInfo( paragraph,
55 void BidirectionalSupport::DestroyInfo( BidiInfoIndex bidiInfoIndex )
57 GetImplementation( *this ).DestroyInfo( bidiInfoIndex );
60 void BidirectionalSupport::Reorder( BidiInfoIndex bidiInfoIndex,
61 CharacterIndex firstCharacterIndex,
62 Length numberOfCharacters,
63 CharacterIndex* visualToLogicalMap )
65 GetImplementation( *this ).Reorder( bidiInfoIndex,
71 bool BidirectionalSupport::GetMirroredText( Character* text,
72 CharacterDirection* directions,
73 Length numberOfCharacters )
75 return GetImplementation( *this ).GetMirroredText( text,
80 bool BidirectionalSupport::GetParagraphDirection( BidiInfoIndex bidiInfoIndex ) const
82 return GetImplementation( *this ).GetParagraphDirection( bidiInfoIndex );
85 void BidirectionalSupport::GetCharactersDirection( BidiInfoIndex bidiInfoIndex,
86 CharacterDirection* directions,
87 Length numberOfCharacters )
89 GetImplementation( *this ).GetCharactersDirection( bidiInfoIndex,
94 } // namespace TextAbstraction