Elliott Hughes | a57ca0d | 2016-11-17 18:18:08 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 The Android Open Source Project |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions |
| 7 | * are met: |
| 8 | * * Redistributions of source code must retain the above copyright |
| 9 | * notice, this list of conditions and the following disclaimer. |
| 10 | * * Redistributions in binary form must reproduce the above copyright |
| 11 | * notice, this list of conditions and the following disclaimer in |
| 12 | * the documentation and/or other materials provided with the |
| 13 | * distribution. |
| 14 | * |
| 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 16 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 17 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 18 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
| 19 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 21 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
| 22 | * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
| 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 24 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
| 25 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 26 | * SUCH DAMAGE. |
| 27 | */ |
| 28 | |
Manish Goregaokar | 361854c | 2025-03-05 15:02:28 -0800 | [diff] [blame] | 29 | #pragma once |
Elliott Hughes | a57ca0d | 2016-11-17 18:18:08 -0800 | [diff] [blame] | 30 | |
Manish Goregaokar | 361854c | 2025-03-05 15:02:28 -0800 | [diff] [blame] | 31 | #include <ctype.h> |
Elliott Hughes | 722d01a | 2016-12-08 15:16:37 -0800 | [diff] [blame] | 32 | #include <stdint.h> |
Elliott Hughes | c41b560 | 2017-07-27 17:08:08 -0700 | [diff] [blame] | 33 | #include <wchar.h> |
Elliott Hughes | 722d01a | 2016-12-08 15:16:37 -0800 | [diff] [blame] | 34 | |
Elliott Hughes | 722d01a | 2016-12-08 15:16:37 -0800 | [diff] [blame] | 35 | enum UCharCategory { |
Elliott Hughes | c41b560 | 2017-07-27 17:08:08 -0700 | [diff] [blame] | 36 | U_NON_SPACING_MARK = 6, |
| 37 | U_ENCLOSING_MARK = 7, |
Manish Goregaokar | 361854c | 2025-03-05 15:02:28 -0800 | [diff] [blame] | 38 | U_DECIMAL_NUMBER = 9, |
Elliott Hughes | 722d01a | 2016-12-08 15:16:37 -0800 | [diff] [blame] | 39 | U_CONTROL_CHAR = 15, |
Elliott Hughes | c41b560 | 2017-07-27 17:08:08 -0700 | [diff] [blame] | 40 | U_FORMAT_CHAR = 16, |
Manish Goregaokar | 361854c | 2025-03-05 15:02:28 -0800 | [diff] [blame] | 41 | U_DASH_PUNCTUATION = 19, |
| 42 | U_OTHER_PUNCTUATION = 23, |
Elliott Hughes | 722d01a | 2016-12-08 15:16:37 -0800 | [diff] [blame] | 43 | }; |
| 44 | |
Elliott Hughes | c41b560 | 2017-07-27 17:08:08 -0700 | [diff] [blame] | 45 | enum UEastAsianWidth { |
| 46 | U_EA_NEUTRAL, |
| 47 | U_EA_AMBIGUOUS, |
| 48 | U_EA_HALFWIDTH, |
| 49 | U_EA_FULLWIDTH, |
| 50 | U_EA_NARROW, |
| 51 | U_EA_WIDE, |
| 52 | }; |
| 53 | |
| 54 | enum UHangulSyllableType { |
| 55 | U_HST_NOT_APPLICABLE, |
| 56 | U_HST_LEADING_JAMO, |
| 57 | U_HST_VOWEL_JAMO, |
| 58 | U_HST_TRAILING_JAMO, |
| 59 | U_HST_LV_SYLLABLE, |
| 60 | U_HST_LVT_SYLLABLE, |
| 61 | }; |
| 62 | |
Manish Goregaokar | 361854c | 2025-03-05 15:02:28 -0800 | [diff] [blame] | 63 | __BEGIN_DECLS |
Elliott Hughes | 8f07d34 | 2024-08-21 23:56:24 +0000 | [diff] [blame] | 64 | |
Manish Goregaokar | 361854c | 2025-03-05 15:02:28 -0800 | [diff] [blame] | 65 | uint8_t __icu4x_bionic_general_category(uint32_t cp); |
| 66 | uint8_t __icu4x_bionic_east_asian_width(uint32_t cp); |
| 67 | uint8_t __icu4x_bionic_hangul_syllable_type(uint32_t cp); |
Elliott Hughes | c41b560 | 2017-07-27 17:08:08 -0700 | [diff] [blame] | 68 | |
Manish Goregaokar | 361854c | 2025-03-05 15:02:28 -0800 | [diff] [blame] | 69 | bool __icu4x_bionic_is_alphabetic(uint32_t cp); |
| 70 | bool __icu4x_bionic_is_default_ignorable_code_point(uint32_t cp); |
| 71 | bool __icu4x_bionic_is_lowercase(uint32_t cp); |
| 72 | bool __icu4x_bionic_is_alnum(uint32_t cp); |
| 73 | bool __icu4x_bionic_is_blank(uint32_t cp); |
| 74 | bool __icu4x_bionic_is_graph(uint32_t cp); |
| 75 | bool __icu4x_bionic_is_print(uint32_t cp); |
| 76 | bool __icu4x_bionic_is_xdigit(uint32_t cp); |
| 77 | bool __icu4x_bionic_is_white_space(uint32_t cp); |
| 78 | bool __icu4x_bionic_is_uppercase(uint32_t cp); |
Elliott Hughes | a57ca0d | 2016-11-17 18:18:08 -0800 | [diff] [blame] | 79 | |
Manish Goregaokar | 361854c | 2025-03-05 15:02:28 -0800 | [diff] [blame] | 80 | uint32_t __icu4x_bionic_to_upper(uint32_t ch); |
| 81 | uint32_t __icu4x_bionic_to_lower(uint32_t ch); |
| 82 | |
| 83 | __END_DECLS |