2 * Copyright (c) 2021 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>
26 namespace TextAbstraction
28 BidirectionalSupport::BidirectionalSupport()
32 BidirectionalSupport::~BidirectionalSupport()
36 BidirectionalSupport::BidirectionalSupport(Internal::BidirectionalSupport* implementation)
37 : BaseHandle(implementation)
41 BidirectionalSupport BidirectionalSupport::Get()
43 return Internal::BidirectionalSupport::Get();
46 BidiInfoIndex BidirectionalSupport::CreateInfo(const Character* const paragraph,
47 Length numberOfCharacters,
48 bool matchLayoutDirection,
49 LayoutDirection::Type layoutDirection)
51 return GetImplementation(*this).CreateInfo(paragraph,
57 void BidirectionalSupport::DestroyInfo(BidiInfoIndex bidiInfoIndex)
59 GetImplementation(*this).DestroyInfo(bidiInfoIndex);
62 void BidirectionalSupport::Reorder(BidiInfoIndex bidiInfoIndex,
63 CharacterIndex firstCharacterIndex,
64 Length numberOfCharacters,
65 CharacterIndex* visualToLogicalMap)
67 GetImplementation(*this).Reorder(bidiInfoIndex,
73 bool BidirectionalSupport::GetMirroredText(Character* text,
74 CharacterDirection* directions,
75 Length numberOfCharacters)
77 return GetImplementation(*this).GetMirroredText(text,
82 bool BidirectionalSupport::GetParagraphDirection(BidiInfoIndex bidiInfoIndex) const
84 return GetImplementation(*this).GetParagraphDirection(bidiInfoIndex);
87 void BidirectionalSupport::GetCharactersDirection(BidiInfoIndex bidiInfoIndex,
88 CharacterDirection* directions,
89 Length numberOfCharacters)
91 GetImplementation(*this).GetCharactersDirection(bidiInfoIndex,
96 } // namespace TextAbstraction