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,
50 bool matchSystemLanguageDirection,
51 LayoutDirection::Type layoutDirection )
53 return GetImplementation( *this ).CreateInfo( paragraph,
55 matchSystemLanguageDirection,
59 void BidirectionalSupport::DestroyInfo( BidiInfoIndex bidiInfoIndex )
61 GetImplementation( *this ).DestroyInfo( bidiInfoIndex );
64 void BidirectionalSupport::Reorder( BidiInfoIndex bidiInfoIndex,
65 CharacterIndex firstCharacterIndex,
66 Length numberOfCharacters,
67 CharacterIndex* visualToLogicalMap )
69 GetImplementation( *this ).Reorder( bidiInfoIndex,
75 bool BidirectionalSupport::GetMirroredText( Character* text,
76 CharacterDirection* directions,
77 Length numberOfCharacters )
79 return GetImplementation( *this ).GetMirroredText( text,
84 bool BidirectionalSupport::GetParagraphDirection( BidiInfoIndex bidiInfoIndex ) const
86 return GetImplementation( *this ).GetParagraphDirection( bidiInfoIndex );
89 void BidirectionalSupport::GetCharactersDirection( BidiInfoIndex bidiInfoIndex,
90 CharacterDirection* directions,
91 Length numberOfCharacters )
93 GetImplementation( *this ).GetCharactersDirection( bidiInfoIndex,
98 } // namespace TextAbstraction