1 #ifndef __DALI_INTERNAL_TEXT_ABSTRACTION_SHAPING_IMPL_H__
2 #define __DALI_INTERNAL_TEXT_ABSTRACTION_SHAPING_IMPL_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/object/base-object.h>
25 #include <dali/public-api/common/dali-vector.h>
26 #include <dali/devel-api/text-abstraction/shaping.h>
31 namespace TextAbstraction
38 * Implementation of the Shaping
40 class Shaping : public BaseObject
55 * @copydoc Dali::Shaping::Get()
57 static TextAbstraction::Shaping Get();
60 * @copydoc Dali::Shaping::Shape()
62 Length Shape( const Character* const text,
63 Length numberOfCharacters,
68 * @copydoc Dali::Shaping::GetGlyphs()
70 void GetGlyphs( GlyphInfo* glyphInfo,
71 CharacterIndex* glyphToCharacterMap );
76 * Helper for lazy initialization.
82 // Undefined copy constructor.
83 Shaping( const Shaping& );
85 // Undefined assignment constructor.
86 Shaping& operator=( const Shaping& );
93 } // namespace Internal
95 } // namespace TextAbstraction
97 inline static TextAbstraction::Internal::Shaping& GetImplementation( TextAbstraction::Shaping& shaping )
99 DALI_ASSERT_ALWAYS( shaping && "shaping handle is empty" );
100 BaseObject& handle = shaping.GetBaseObject();
101 return static_cast<TextAbstraction::Internal::Shaping&>( handle );
104 inline static const TextAbstraction::Internal::Shaping& GetImplementation( const TextAbstraction::Shaping& shaping )
106 DALI_ASSERT_ALWAYS( shaping && "shaping handle is empty" );
107 const BaseObject& handle = shaping.GetBaseObject();
108 return static_cast<const TextAbstraction::Internal::Shaping&>( handle );
113 #endif // __DALI_INTERNAL_TEXT_ABSTRACTION_SHAPING_IMPL_H__