Make GlyphBufferData as another class
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / text-abstraction / emoji-character-properties.h
1 #ifndef DALI_TOOLKIT_TEXT_ABSTRACTION_EMOJI_CHARACTER_PROPERTIES_H
2 #define DALI_TOOLKIT_TEXT_ABSTRACTION_EMOJI_CHARACTER_PROPERTIES_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 // EXTERNAL INCLUDES
22 #include <set>
23 // INTERNAL INCLUDES
24 #include <dali/devel-api/text-abstraction/defined-characters.h>
25 #include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
26 #include <dali/public-api/dali-adaptor-common.h>
27
28 namespace Dali
29 {
30 namespace TextAbstraction
31 {
32 /**
33  * @brief Whether the character is emoji-component | emoji-modifier | COMBINING-ENCLOSING-KEYCAP | regional-indicator | TextPresentationSelector | EmojiPresentationSelector | TagSpec | TagEnd.
34  *
35  * @param[in] character The character
36  *
37  * @return @e true if the character  is emoji-component | emoji-modifier | COMBINING-ENCLOSING-KEYCAP | regional-indicator | TextPresentationSelector | EmojiPresentationSelector | TagSpec | TagEnd.
38  */
39 DALI_ADAPTOR_API bool IsEmojiItem(Character character);
40
41 /**
42  * @brief Whether the character is emoji component.
43  * Emoji Properties and Data Files: https://www.unicode.org/reports/tr51/#Emoji_Properties_and_Data_Files
44  *
45  * @note True for characters used in emoji sequences that normally do not appear on emoji keyboards as separate choices, such as keycap base characters or Regional_Indicator characters.
46  *
47  * @param[in] character The character.
48  *
49  * @return @e true if the character is emoji component.
50  */
51 DALI_ADAPTOR_API bool IsEmojiComponent(Character character);
52
53 /**
54  * @brief Whether the character is emoji modifier.
55  * Emoji Properties and Data Files: https://www.unicode.org/reports/tr51/#Emoji_Properties_and_Data_Files
56  *
57  * @param[in] character The character.
58  *
59  * @return @e true if the character is emoji modifier.
60  */
61 DALI_ADAPTOR_API bool IsEmojiModifier(Character character);
62
63 /**
64  * @brief Whether the character is COMBINING ENCLOSING KEYCAP.
65  * Combining Enclosing Keycap: https://emojipedia.org/combining-enclosing-keycap/
66  *
67  * @note The Codepoint of COMBINING ENCLOSING KEYCAP is {U+20E3}
68  *
69  * @param[in] character The character.
70  *
71  * @return @e true if the character is COMBINING ENCLOSING KEYCAP.
72  */
73 DALI_ADAPTOR_API bool IsCombiningEnclosingKeycap(Character character);
74
75 /**
76  * @brief Whether the character is Regional Indicator.
77  * Regional Indicator Symbol Letter A: https://emojipedia.org/regional-indicator-symbol-letter-a/
78  * Regional Indicator Symbol Letter Z: https://emojipedia.org/regional-indicator-symbol-letter-z/
79  *
80  * @note The Codepoints of Regional Indicator Symbol Letters [A-Z] are [U+1F1E6 - U+1F1FF]
81  *
82  *
83  * @param[in] character The character.
84  *
85  * @return @e true if the character is Regional Indicator.
86  */
87 DALI_ADAPTOR_API bool IsRegionalIndicator(Character character);
88
89 /**
90  * @brief Whether the character is text presentation selector (VARIATION SELECTOR-15).
91  * Text Presentation Selector: https://www.unicode.org/reports/tr51/#def_text_presentation_selector
92  *
93  * @note The character U+FE0E VARIATION SELECTOR-15 (VS15), used to request a text presentation for an emoji character. Also known as text variation selector.
94  *
95  * @param[in] character The character.
96  *
97  * @return @e true if the character is text presentation selector (VARIATION SELECTOR-15).
98  */
99 DALI_ADAPTOR_API bool IsTextPresentationSelector(Character character);
100
101 /**
102  * @brief Whether the character is emoji variation selector (VARIATION SELECTOR-16).
103  * Emoji Presentation Selector: https://www.unicode.org/reports/tr51/#def_emoji_presentation_selector
104  *
105  * @note The character U+FE0F VARIATION SELECTOR-16 (VS16), used to request an emoji presentation for an emoji character. Also known as emoji variation selector.
106  *
107  * @param[in] character The character.
108  *
109  * @return @e true if the character is emoji presentation selector (VARIATION SELECTOR-16).
110  */
111 DALI_ADAPTOR_API bool IsEmojiPresentationSelector(Character character);
112
113 /**
114  * @brief Whether the character is tag spec.
115  * Emoji Tag Sequence (ETS): https://www.unicode.org/reports/tr51/#def_emoji_tag_sequence
116  *
117  * @note The tag_spec consists of all characters from U+E0020 TAG SPACE to U+E007E TAG TILDE.
118  * Each tag_spec defines a particular visual variant to be applied to the tag_base character(s).
119  * Though tag_spec includes the values U+E0041 TAG LATIN CAPITAL LETTER A .. U+E005A TAG LATIN CAPITAL LETTER Z,
120  * they are not used currently and are reserved for future extensions.
121  *
122  * @param[in] character The character.
123  *
124  * @return @e true if the character is tag spec.
125  */
126 DALI_ADAPTOR_API bool IsTagSpec(Character character);
127
128 /**
129  * @brief Whether the character is tag end.
130  * Emoji Tag Sequence (ETS): https://www.unicode.org/reports/tr51/#def_emoji_tag_sequence
131  *
132  * @note The tag_end consists of the character U+E007F CANCEL TAG, and must be used to terminate the tag sequence.
133  *
134  * @param[in] character The character.
135  *
136  * @return @e true if the character is tag end.
137  */
138 DALI_ADAPTOR_API bool IsTagEnd(Character character);
139
140 /**
141  * @brief Whether the character is Miscellaneous Symbols and Arrows emoji.
142  * Miscellaneous Symbols and Arrows emoji: https://unicode-table.com/en/blocks/miscellaneous-symbols-and-arrows/
143  *
144  * @note The Range is 2B00—2BFF and the quantity of characters is 256.
145  *
146  * @param[in] character The character.
147  *
148  * @return @e true if the character is Miscellaneous Symbols and Arrows emoji.
149  */
150 DALI_ADAPTOR_API bool IsMiscellaneousSymbolsAndArrowsEmoji(Character character);
151
152 /**
153  * @brief Whether the character is Dingbats emoji.
154  * Dingbats emoji: https://unicode-table.com/en/blocks/dingbats/
155  *
156  * @note The Range is 2700—27BF and the quantity of characters is 192.
157  *
158  * @param[in] character The character.
159  *
160  * @return @e true if the character is Dingbats emoji.
161  */
162 DALI_ADAPTOR_API bool IsDingbatsEmoji(Character character);
163
164 /**
165  * @brief Whether the character is ASCII digits.
166  * ASCII digits: https://unicode-table.com/en/blocks/basic-latin/
167  *
168  * @note The Range is 0030—0039 and the quantity of characters is 10.
169  *
170  * @param[in] character The character.
171  *
172  * @return @e true if the character is ASCII digits.
173  */
174 DALI_ADAPTOR_API bool IsASCIIDigits(Character character);
175
176 /**
177  * @brief Whether the character is emoji-variation-sequences.
178  * Emoji Variation Sequences for UTS #51: https://www.unicode.org/Public/14.0.0/ucd/emoji/emoji-variation-sequences.txt
179  *
180  * @param[in] character The character.
181  *
182  * @return @e true if the character is emoji-variation-sequences.
183  */
184 DALI_ADAPTOR_API bool IsEmojiVariationSequences(Character character);
185
186 /**
187  * @brief Whether the character is Negative Squared Latin Capital Letter.
188  * Read more at White on black squared Latin letters: https://unicode-table.com/en/blocks/enclosed-alphanumeric-supplement/
189  *
190  *
191  * @param[in] character The character.
192  *
193  * @return @e true if the character is Negative Squared Latin Capital Letter.
194  */
195 DALI_ADAPTOR_API bool IsNegativeSquaredLatinCapitalLetter(Character character);
196
197 } // namespace TextAbstraction
198
199 } // namespace Dali
200
201 #endif // DALI_TOOLKIT_TEXT_ABSTRACTION_EMOJI_CHARACTER_PROPERTIES_H