Make GlyphBufferData as another class
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / text-abstraction / emoji-helper.h
1 #ifndef DALI_TOOLKIT_TEXT_ABSTRACTION_EMOJI_HELPER_H
2 #define DALI_TOOLKIT_TEXT_ABSTRACTION_EMOJI_HELPER_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/devel-api/text-abstraction/script.h>
23
24 namespace Dali
25 {
26 namespace TextAbstraction
27 {
28 /**
29  * @brief Whether the script is symbol.
30  *
31  * @note Check whether the script is in [SYMBOLS1, SYMBOLS2, SYMBOLS3, SYMBOLS4, SYMBOLS5]
32  *
33  * @param[in] script The script.
34  *
35  * @return @e true if the script is symbol.
36  */
37 DALI_ADAPTOR_API bool IsSymbolScript(const TextAbstraction::Script& script);
38
39 /**
40  * @brief Whether the script is EMOJI.
41  *
42  * @param[in] script The script.
43  *
44  * @return @e true if the script is EMOJI.
45  */
46 DALI_ADAPTOR_API bool IsEmojiScript(const TextAbstraction::Script& script);
47
48 /**
49  * @brief Whether the script is EMOJI_TEXT.
50  *
51  * @param[in] script The script.
52  *
53  * @return @e true if the script is EMOJI_TEXT.
54  */
55 DALI_ADAPTOR_API bool IsEmojiTextScript(const TextAbstraction::Script& script);
56
57 /**
58  * @brief Whether the script is EMOJI_COLOR.
59  *
60  * @param[in] script The script.
61  *
62  * @return @e true if the script is EMOJI_COLOR.
63  */
64 DALI_ADAPTOR_API bool IsEmojiColorScript(const TextAbstraction::Script& script);
65
66 /**
67  * @brief Whether the script is symbol or emoji.
68  *
69  * @note At least one of IsSymbol and IsEmoji is true.
70  *
71  * @param[in] script The script.
72  *
73  * @return @e true if the script is symbol or emoji.
74  */
75 DALI_ADAPTOR_API bool IsSymbolOrEmojiScript(const TextAbstraction::Script& script);
76
77 /**
78  * @brief Whether the script is SYMBOL | EMOJI | TEXT.
79  *
80  * @note At least one of IsSymbol and IsEmoji and IsText is true.
81  *
82  * @param[in] script The script.
83  *
84  * @return @e true if the script is SYMBOL | EMOJI | EMOJI_COLOR| EMOJI_TEXT.
85  */
86 DALI_ADAPTOR_API bool IsSymbolOrEmojiOrTextScript(const TextAbstraction::Script& script);
87
88 /**
89  * @brief Whether the script is EMOJI | EMOJI_COLOR| EMOJI_TEXT.
90  *
91  * @param[in] script The script.
92  *
93  * @return @e true if the script is EMOJI | EMOJI_COLOR| EMOJI_TEXT.
94  */
95 DALI_ADAPTOR_API bool IsOneOfEmojiScripts(const TextAbstraction::Script& script);
96
97 /**
98  * @brief Retrieve the unicode for invisible glyphs
99  *
100  * @note Used CHAR_ZWS it is the unicode for Zero Width Space character
101  *
102  * @return Retrieve the unicode for Zero Width Space character
103  */
104 DALI_ADAPTOR_API Character GetUnicodeForInvisibleGlyph();
105
106 } // namespace TextAbstraction
107
108 } // namespace Dali
109
110 #endif // DALI_TOOLKIT_TEXT_ABSTRACTION_EMOJI_HELPER_H