diff options
Diffstat (limited to 'intl/icu_capi/c/include')
187 files changed, 6641 insertions, 0 deletions
diff --git a/intl/icu_capi/c/include/CodePointRangeIterator.h b/intl/icu_capi/c/include/CodePointRangeIterator.h new file mode 100644 index 0000000000..36d6d23175 --- /dev/null +++ b/intl/icu_capi/c/include/CodePointRangeIterator.h @@ -0,0 +1,30 @@ +#ifndef CodePointRangeIterator_H +#define CodePointRangeIterator_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct CodePointRangeIterator CodePointRangeIterator; +#ifdef __cplusplus +} // namespace capi +#endif +#include "CodePointRangeIteratorResult.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +CodePointRangeIteratorResult CodePointRangeIterator_next(CodePointRangeIterator* self); +void CodePointRangeIterator_destroy(CodePointRangeIterator* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/CodePointRangeIteratorResult.h b/intl/icu_capi/c/include/CodePointRangeIteratorResult.h new file mode 100644 index 0000000000..846873be11 --- /dev/null +++ b/intl/icu_capi/c/include/CodePointRangeIteratorResult.h @@ -0,0 +1,32 @@ +#ifndef CodePointRangeIteratorResult_H +#define CodePointRangeIteratorResult_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct CodePointRangeIteratorResult { + uint32_t start; + uint32_t end; + bool done; +} CodePointRangeIteratorResult; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void CodePointRangeIteratorResult_destroy(CodePointRangeIteratorResult* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XAnyCalendarKind.h b/intl/icu_capi/c/include/ICU4XAnyCalendarKind.h new file mode 100644 index 0000000000..329f381577 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XAnyCalendarKind.h @@ -0,0 +1,55 @@ +#ifndef ICU4XAnyCalendarKind_H +#define ICU4XAnyCalendarKind_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XAnyCalendarKind { + ICU4XAnyCalendarKind_Iso = 0, + ICU4XAnyCalendarKind_Gregorian = 1, + ICU4XAnyCalendarKind_Buddhist = 2, + ICU4XAnyCalendarKind_Japanese = 3, + ICU4XAnyCalendarKind_JapaneseExtended = 4, + ICU4XAnyCalendarKind_Ethiopian = 5, + ICU4XAnyCalendarKind_EthiopianAmeteAlem = 6, + ICU4XAnyCalendarKind_Indian = 7, + ICU4XAnyCalendarKind_Coptic = 8, + ICU4XAnyCalendarKind_Dangi = 9, + ICU4XAnyCalendarKind_Chinese = 10, + ICU4XAnyCalendarKind_Hebrew = 11, + ICU4XAnyCalendarKind_IslamicCivil = 12, + ICU4XAnyCalendarKind_IslamicObservational = 13, + ICU4XAnyCalendarKind_IslamicTabular = 14, + ICU4XAnyCalendarKind_IslamicUmmAlQura = 15, + ICU4XAnyCalendarKind_Persian = 16, + ICU4XAnyCalendarKind_Roc = 17, +} ICU4XAnyCalendarKind; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XLocale.h" +#include "diplomat_result_ICU4XAnyCalendarKind_void.h" +#include "diplomat_result_void_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_ICU4XAnyCalendarKind_void ICU4XAnyCalendarKind_get_for_locale(const ICU4XLocale* locale); + +diplomat_result_ICU4XAnyCalendarKind_void ICU4XAnyCalendarKind_get_for_bcp47(const char* s_data, size_t s_len); + +diplomat_result_void_ICU4XError ICU4XAnyCalendarKind_bcp47(ICU4XAnyCalendarKind self, DiplomatWriteable* write); +void ICU4XAnyCalendarKind_destroy(ICU4XAnyCalendarKind* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XBcp47ToIanaMapper.h b/intl/icu_capi/c/include/ICU4XBcp47ToIanaMapper.h new file mode 100644 index 0000000000..483afe1ec2 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XBcp47ToIanaMapper.h @@ -0,0 +1,34 @@ +#ifndef ICU4XBcp47ToIanaMapper_H +#define ICU4XBcp47ToIanaMapper_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XBcp47ToIanaMapper ICU4XBcp47ToIanaMapper; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h" +#include "diplomat_result_void_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError ICU4XBcp47ToIanaMapper_create(const ICU4XDataProvider* provider); + +diplomat_result_void_ICU4XError ICU4XBcp47ToIanaMapper_get(const ICU4XBcp47ToIanaMapper* self, const char* value_data, size_t value_len, DiplomatWriteable* write); +void ICU4XBcp47ToIanaMapper_destroy(ICU4XBcp47ToIanaMapper* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XBidi.h b/intl/icu_capi/c/include/ICU4XBidi.h new file mode 100644 index 0000000000..1ed7cfc8c2 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XBidi.h @@ -0,0 +1,45 @@ +#ifndef ICU4XBidi_H +#define ICU4XBidi_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XBidi ICU4XBidi; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XBidi_ICU4XError.h" +#include "ICU4XBidiInfo.h" +#include "ICU4XReorderedIndexMap.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XBidi_ICU4XError ICU4XBidi_create(const ICU4XDataProvider* provider); + +ICU4XBidiInfo* ICU4XBidi_for_text(const ICU4XBidi* self, const char* text_data, size_t text_len, uint8_t default_level); + +ICU4XReorderedIndexMap* ICU4XBidi_reorder_visual(const ICU4XBidi* self, const uint8_t* levels_data, size_t levels_len); + +bool ICU4XBidi_level_is_rtl(uint8_t level); + +bool ICU4XBidi_level_is_ltr(uint8_t level); + +uint8_t ICU4XBidi_level_rtl(); + +uint8_t ICU4XBidi_level_ltr(); +void ICU4XBidi_destroy(ICU4XBidi* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XBidiDirection.h b/intl/icu_capi/c/include/ICU4XBidiDirection.h new file mode 100644 index 0000000000..33de81d6e9 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XBidiDirection.h @@ -0,0 +1,32 @@ +#ifndef ICU4XBidiDirection_H +#define ICU4XBidiDirection_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XBidiDirection { + ICU4XBidiDirection_Ltr = 0, + ICU4XBidiDirection_Rtl = 1, + ICU4XBidiDirection_Mixed = 2, +} ICU4XBidiDirection; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XBidiDirection_destroy(ICU4XBidiDirection* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XBidiInfo.h b/intl/icu_capi/c/include/ICU4XBidiInfo.h new file mode 100644 index 0000000000..02e8c21659 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XBidiInfo.h @@ -0,0 +1,36 @@ +#ifndef ICU4XBidiInfo_H +#define ICU4XBidiInfo_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XBidiInfo ICU4XBidiInfo; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XBidiParagraph.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +size_t ICU4XBidiInfo_paragraph_count(const ICU4XBidiInfo* self); + +ICU4XBidiParagraph* ICU4XBidiInfo_paragraph_at(const ICU4XBidiInfo* self, size_t n); + +size_t ICU4XBidiInfo_size(const ICU4XBidiInfo* self); + +uint8_t ICU4XBidiInfo_level_at(const ICU4XBidiInfo* self, size_t pos); +void ICU4XBidiInfo_destroy(ICU4XBidiInfo* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XBidiParagraph.h b/intl/icu_capi/c/include/ICU4XBidiParagraph.h new file mode 100644 index 0000000000..269f940cc7 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XBidiParagraph.h @@ -0,0 +1,43 @@ +#ifndef ICU4XBidiParagraph_H +#define ICU4XBidiParagraph_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XBidiParagraph ICU4XBidiParagraph; +#ifdef __cplusplus +} // namespace capi +#endif +#include "diplomat_result_void_ICU4XError.h" +#include "ICU4XBidiDirection.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_void_ICU4XError ICU4XBidiParagraph_set_paragraph_in_text(ICU4XBidiParagraph* self, size_t n); + +ICU4XBidiDirection ICU4XBidiParagraph_direction(const ICU4XBidiParagraph* self); + +size_t ICU4XBidiParagraph_size(const ICU4XBidiParagraph* self); + +size_t ICU4XBidiParagraph_range_start(const ICU4XBidiParagraph* self); + +size_t ICU4XBidiParagraph_range_end(const ICU4XBidiParagraph* self); + +diplomat_result_void_ICU4XError ICU4XBidiParagraph_reorder_line(const ICU4XBidiParagraph* self, size_t range_start, size_t range_end, DiplomatWriteable* out); + +uint8_t ICU4XBidiParagraph_level_at(const ICU4XBidiParagraph* self, size_t pos); +void ICU4XBidiParagraph_destroy(ICU4XBidiParagraph* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCalendar.h b/intl/icu_capi/c/include/ICU4XCalendar.h new file mode 100644 index 0000000000..9ea6484b5f --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCalendar.h @@ -0,0 +1,37 @@ +#ifndef ICU4XCalendar_H +#define ICU4XCalendar_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XCalendar ICU4XCalendar; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "diplomat_result_box_ICU4XCalendar_ICU4XError.h" +#include "ICU4XAnyCalendarKind.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XCalendar_ICU4XError ICU4XCalendar_create_for_locale(const ICU4XDataProvider* provider, const ICU4XLocale* locale); + +diplomat_result_box_ICU4XCalendar_ICU4XError ICU4XCalendar_create_for_kind(const ICU4XDataProvider* provider, ICU4XAnyCalendarKind kind); + +ICU4XAnyCalendarKind ICU4XCalendar_kind(const ICU4XCalendar* self); +void ICU4XCalendar_destroy(ICU4XCalendar* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCanonicalCombiningClassMap.h b/intl/icu_capi/c/include/ICU4XCanonicalCombiningClassMap.h new file mode 100644 index 0000000000..f0fc447ba0 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCanonicalCombiningClassMap.h @@ -0,0 +1,35 @@ +#ifndef ICU4XCanonicalCombiningClassMap_H +#define ICU4XCanonicalCombiningClassMap_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XCanonicalCombiningClassMap ICU4XCanonicalCombiningClassMap; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError ICU4XCanonicalCombiningClassMap_create(const ICU4XDataProvider* provider); + +uint8_t ICU4XCanonicalCombiningClassMap_get(const ICU4XCanonicalCombiningClassMap* self, char32_t ch); + +uint8_t ICU4XCanonicalCombiningClassMap_get32(const ICU4XCanonicalCombiningClassMap* self, uint32_t ch); +void ICU4XCanonicalCombiningClassMap_destroy(ICU4XCanonicalCombiningClassMap* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCanonicalComposition.h b/intl/icu_capi/c/include/ICU4XCanonicalComposition.h new file mode 100644 index 0000000000..e9ae621739 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCanonicalComposition.h @@ -0,0 +1,33 @@ +#ifndef ICU4XCanonicalComposition_H +#define ICU4XCanonicalComposition_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XCanonicalComposition ICU4XCanonicalComposition; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XCanonicalComposition_ICU4XError ICU4XCanonicalComposition_create(const ICU4XDataProvider* provider); + +char32_t ICU4XCanonicalComposition_compose(const ICU4XCanonicalComposition* self, char32_t starter, char32_t second); +void ICU4XCanonicalComposition_destroy(ICU4XCanonicalComposition* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCanonicalDecomposition.h b/intl/icu_capi/c/include/ICU4XCanonicalDecomposition.h new file mode 100644 index 0000000000..d18d108b90 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCanonicalDecomposition.h @@ -0,0 +1,34 @@ +#ifndef ICU4XCanonicalDecomposition_H +#define ICU4XCanonicalDecomposition_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XCanonicalDecomposition ICU4XCanonicalDecomposition; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h" +#include "ICU4XDecomposed.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError ICU4XCanonicalDecomposition_create(const ICU4XDataProvider* provider); + +ICU4XDecomposed ICU4XCanonicalDecomposition_decompose(const ICU4XCanonicalDecomposition* self, char32_t c); +void ICU4XCanonicalDecomposition_destroy(ICU4XCanonicalDecomposition* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCaseMapCloser.h b/intl/icu_capi/c/include/ICU4XCaseMapCloser.h new file mode 100644 index 0000000000..ed2129006c --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCaseMapCloser.h @@ -0,0 +1,36 @@ +#ifndef ICU4XCaseMapCloser_H +#define ICU4XCaseMapCloser_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XCaseMapCloser ICU4XCaseMapCloser; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h" +#include "ICU4XCodePointSetBuilder.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XCaseMapCloser_ICU4XError ICU4XCaseMapCloser_create(const ICU4XDataProvider* provider); + +void ICU4XCaseMapCloser_add_case_closure_to(const ICU4XCaseMapCloser* self, char32_t c, ICU4XCodePointSetBuilder* builder); + +bool ICU4XCaseMapCloser_add_string_case_closure_to(const ICU4XCaseMapCloser* self, const char* s_data, size_t s_len, ICU4XCodePointSetBuilder* builder); +void ICU4XCaseMapCloser_destroy(ICU4XCaseMapCloser* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCaseMapper.h b/intl/icu_capi/c/include/ICU4XCaseMapper.h new file mode 100644 index 0000000000..aef264f722 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCaseMapper.h @@ -0,0 +1,57 @@ +#ifndef ICU4XCaseMapper_H +#define ICU4XCaseMapper_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XCaseMapper ICU4XCaseMapper; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XCaseMapper_ICU4XError.h" +#include "ICU4XLocale.h" +#include "diplomat_result_void_ICU4XError.h" +#include "ICU4XTitlecaseOptionsV1.h" +#include "ICU4XCodePointSetBuilder.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XCaseMapper_ICU4XError ICU4XCaseMapper_create(const ICU4XDataProvider* provider); + +diplomat_result_void_ICU4XError ICU4XCaseMapper_lowercase(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XCaseMapper_uppercase(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XCaseMapper_titlecase_segment_with_only_case_data_v1(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, ICU4XTitlecaseOptionsV1 options, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XCaseMapper_fold(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XCaseMapper_fold_turkic(const ICU4XCaseMapper* self, const char* s_data, size_t s_len, DiplomatWriteable* write); + +void ICU4XCaseMapper_add_case_closure_to(const ICU4XCaseMapper* self, char32_t c, ICU4XCodePointSetBuilder* builder); + +char32_t ICU4XCaseMapper_simple_lowercase(const ICU4XCaseMapper* self, char32_t ch); + +char32_t ICU4XCaseMapper_simple_uppercase(const ICU4XCaseMapper* self, char32_t ch); + +char32_t ICU4XCaseMapper_simple_titlecase(const ICU4XCaseMapper* self, char32_t ch); + +char32_t ICU4XCaseMapper_simple_fold(const ICU4XCaseMapper* self, char32_t ch); + +char32_t ICU4XCaseMapper_simple_fold_turkic(const ICU4XCaseMapper* self, char32_t ch); +void ICU4XCaseMapper_destroy(ICU4XCaseMapper* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCodePointMapData16.h b/intl/icu_capi/c/include/ICU4XCodePointMapData16.h new file mode 100644 index 0000000000..19effe2d92 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCodePointMapData16.h @@ -0,0 +1,43 @@ +#ifndef ICU4XCodePointMapData16_H +#define ICU4XCodePointMapData16_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XCodePointMapData16 ICU4XCodePointMapData16; +#ifdef __cplusplus +} // namespace capi +#endif +#include "CodePointRangeIterator.h" +#include "ICU4XCodePointSetData.h" +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +uint16_t ICU4XCodePointMapData16_get(const ICU4XCodePointMapData16* self, char32_t cp); + +uint16_t ICU4XCodePointMapData16_get32(const ICU4XCodePointMapData16* self, uint32_t cp); + +CodePointRangeIterator* ICU4XCodePointMapData16_iter_ranges_for_value(const ICU4XCodePointMapData16* self, uint16_t value); + +CodePointRangeIterator* ICU4XCodePointMapData16_iter_ranges_for_value_complemented(const ICU4XCodePointMapData16* self, uint16_t value); + +ICU4XCodePointSetData* ICU4XCodePointMapData16_get_set_for_value(const ICU4XCodePointMapData16* self, uint16_t value); + +diplomat_result_box_ICU4XCodePointMapData16_ICU4XError ICU4XCodePointMapData16_load_script(const ICU4XDataProvider* provider); +void ICU4XCodePointMapData16_destroy(ICU4XCodePointMapData16* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCodePointMapData8.h b/intl/icu_capi/c/include/ICU4XCodePointMapData8.h new file mode 100644 index 0000000000..87fe8854b2 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCodePointMapData8.h @@ -0,0 +1,61 @@ +#ifndef ICU4XCodePointMapData8_H +#define ICU4XCodePointMapData8_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XCodePointMapData8 ICU4XCodePointMapData8; +#ifdef __cplusplus +} // namespace capi +#endif +#include "CodePointRangeIterator.h" +#include "ICU4XCodePointSetData.h" +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +uint8_t ICU4XCodePointMapData8_get(const ICU4XCodePointMapData8* self, char32_t cp); + +uint8_t ICU4XCodePointMapData8_get32(const ICU4XCodePointMapData8* self, uint32_t cp); + +uint32_t ICU4XCodePointMapData8_general_category_to_mask(uint8_t gc); + +CodePointRangeIterator* ICU4XCodePointMapData8_iter_ranges_for_value(const ICU4XCodePointMapData8* self, uint8_t value); + +CodePointRangeIterator* ICU4XCodePointMapData8_iter_ranges_for_value_complemented(const ICU4XCodePointMapData8* self, uint8_t value); + +CodePointRangeIterator* ICU4XCodePointMapData8_iter_ranges_for_mask(const ICU4XCodePointMapData8* self, uint32_t mask); + +ICU4XCodePointSetData* ICU4XCodePointMapData8_get_set_for_value(const ICU4XCodePointMapData8* self, uint8_t value); + +diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_general_category(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_bidi_class(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_east_asian_width(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_indic_syllabic_category(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_line_break(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_try_grapheme_cluster_break(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_word_break(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_sentence_break(const ICU4XDataProvider* provider); +void ICU4XCodePointMapData8_destroy(ICU4XCodePointMapData8* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCodePointSetBuilder.h b/intl/icu_capi/c/include/ICU4XCodePointSetBuilder.h new file mode 100644 index 0000000000..d36697c7cf --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCodePointSetBuilder.h @@ -0,0 +1,64 @@ +#ifndef ICU4XCodePointSetBuilder_H +#define ICU4XCodePointSetBuilder_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XCodePointSetBuilder ICU4XCodePointSetBuilder; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XCodePointSetData.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +ICU4XCodePointSetBuilder* ICU4XCodePointSetBuilder_create(); + +ICU4XCodePointSetData* ICU4XCodePointSetBuilder_build(ICU4XCodePointSetBuilder* self); + +void ICU4XCodePointSetBuilder_complement(ICU4XCodePointSetBuilder* self); + +bool ICU4XCodePointSetBuilder_is_empty(const ICU4XCodePointSetBuilder* self); + +void ICU4XCodePointSetBuilder_add_char(ICU4XCodePointSetBuilder* self, char32_t ch); + +void ICU4XCodePointSetBuilder_add_u32(ICU4XCodePointSetBuilder* self, uint32_t ch); + +void ICU4XCodePointSetBuilder_add_inclusive_range(ICU4XCodePointSetBuilder* self, char32_t start, char32_t end); + +void ICU4XCodePointSetBuilder_add_inclusive_range_u32(ICU4XCodePointSetBuilder* self, uint32_t start, uint32_t end); + +void ICU4XCodePointSetBuilder_add_set(ICU4XCodePointSetBuilder* self, const ICU4XCodePointSetData* data); + +void ICU4XCodePointSetBuilder_remove_char(ICU4XCodePointSetBuilder* self, char32_t ch); + +void ICU4XCodePointSetBuilder_remove_inclusive_range(ICU4XCodePointSetBuilder* self, char32_t start, char32_t end); + +void ICU4XCodePointSetBuilder_remove_set(ICU4XCodePointSetBuilder* self, const ICU4XCodePointSetData* data); + +void ICU4XCodePointSetBuilder_retain_char(ICU4XCodePointSetBuilder* self, char32_t ch); + +void ICU4XCodePointSetBuilder_retain_inclusive_range(ICU4XCodePointSetBuilder* self, char32_t start, char32_t end); + +void ICU4XCodePointSetBuilder_retain_set(ICU4XCodePointSetBuilder* self, const ICU4XCodePointSetData* data); + +void ICU4XCodePointSetBuilder_complement_char(ICU4XCodePointSetBuilder* self, char32_t ch); + +void ICU4XCodePointSetBuilder_complement_inclusive_range(ICU4XCodePointSetBuilder* self, char32_t start, char32_t end); + +void ICU4XCodePointSetBuilder_complement_set(ICU4XCodePointSetBuilder* self, const ICU4XCodePointSetData* data); +void ICU4XCodePointSetBuilder_destroy(ICU4XCodePointSetBuilder* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCodePointSetData.h b/intl/icu_capi/c/include/ICU4XCodePointSetData.h new file mode 100644 index 0000000000..10356e90b7 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCodePointSetData.h @@ -0,0 +1,172 @@ +#ifndef ICU4XCodePointSetData_H +#define ICU4XCodePointSetData_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XCodePointSetData ICU4XCodePointSetData; +#ifdef __cplusplus +} // namespace capi +#endif +#include "CodePointRangeIterator.h" +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +bool ICU4XCodePointSetData_contains(const ICU4XCodePointSetData* self, char32_t cp); + +bool ICU4XCodePointSetData_contains32(const ICU4XCodePointSetData* self, uint32_t cp); + +CodePointRangeIterator* ICU4XCodePointSetData_iter_ranges(const ICU4XCodePointSetData* self); + +CodePointRangeIterator* ICU4XCodePointSetData_iter_ranges_complemented(const ICU4XCodePointSetData* self); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_for_general_category_group(const ICU4XDataProvider* provider, uint32_t group); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ascii_hex_digit(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_alnum(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_alphabetic(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_bidi_control(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_bidi_mirrored(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_blank(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_cased(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_case_ignorable(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_full_composition_exclusion(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_casefolded(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_casemapped(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_nfkc_casefolded(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_lowercased(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_titlecased(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_changes_when_uppercased(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_dash(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_deprecated(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_default_ignorable_code_point(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_diacritic(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_modifier_base(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_component(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_modifier(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_emoji_presentation(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_extender(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_extended_pictographic(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_graph(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_base(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_extend(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_grapheme_link(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_hex_digit(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_hyphen(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_id_continue(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ideographic(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_id_start(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ids_binary_operator(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_ids_trinary_operator(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_join_control(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_logical_order_exception(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_lowercase(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_math(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_noncharacter_code_point(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfc_inert(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfd_inert(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfkc_inert(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_nfkd_inert(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_pattern_syntax(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_pattern_white_space(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_prepended_concatenation_mark(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_print(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_quotation_mark(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_radical(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_regional_indicator(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_soft_dotted(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_segment_starter(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_case_sensitive(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_sentence_terminal(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_terminal_punctuation(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_unified_ideograph(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_uppercase(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_variation_selector(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_white_space(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xdigit(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xid_continue(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_xid_start(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XCodePointSetData_ICU4XError ICU4XCodePointSetData_load_for_ecma262(const ICU4XDataProvider* provider, const char* property_name_data, size_t property_name_len); +void ICU4XCodePointSetData_destroy(ICU4XCodePointSetData* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCollator.h b/intl/icu_capi/c/include/ICU4XCollator.h new file mode 100644 index 0000000000..973c2cedd9 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCollator.h @@ -0,0 +1,40 @@ +#ifndef ICU4XCollator_H +#define ICU4XCollator_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XCollator ICU4XCollator; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "ICU4XCollatorOptionsV1.h" +#include "diplomat_result_box_ICU4XCollator_ICU4XError.h" +#include "ICU4XOrdering.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XCollator_ICU4XError ICU4XCollator_create_v1(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XCollatorOptionsV1 options); + +ICU4XOrdering ICU4XCollator_compare(const ICU4XCollator* self, const char* left_data, size_t left_len, const char* right_data, size_t right_len); + +ICU4XOrdering ICU4XCollator_compare_valid_utf8(const ICU4XCollator* self, const char* left_data, size_t left_len, const char* right_data, size_t right_len); + +ICU4XOrdering ICU4XCollator_compare_utf16(const ICU4XCollator* self, const uint16_t* left_data, size_t left_len, const uint16_t* right_data, size_t right_len); +void ICU4XCollator_destroy(ICU4XCollator* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCollatorAlternateHandling.h b/intl/icu_capi/c/include/ICU4XCollatorAlternateHandling.h new file mode 100644 index 0000000000..dfc3d595eb --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCollatorAlternateHandling.h @@ -0,0 +1,32 @@ +#ifndef ICU4XCollatorAlternateHandling_H +#define ICU4XCollatorAlternateHandling_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XCollatorAlternateHandling { + ICU4XCollatorAlternateHandling_Auto = 0, + ICU4XCollatorAlternateHandling_NonIgnorable = 1, + ICU4XCollatorAlternateHandling_Shifted = 2, +} ICU4XCollatorAlternateHandling; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XCollatorAlternateHandling_destroy(ICU4XCollatorAlternateHandling* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCollatorBackwardSecondLevel.h b/intl/icu_capi/c/include/ICU4XCollatorBackwardSecondLevel.h new file mode 100644 index 0000000000..659f9b2f10 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCollatorBackwardSecondLevel.h @@ -0,0 +1,32 @@ +#ifndef ICU4XCollatorBackwardSecondLevel_H +#define ICU4XCollatorBackwardSecondLevel_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XCollatorBackwardSecondLevel { + ICU4XCollatorBackwardSecondLevel_Auto = 0, + ICU4XCollatorBackwardSecondLevel_Off = 1, + ICU4XCollatorBackwardSecondLevel_On = 2, +} ICU4XCollatorBackwardSecondLevel; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XCollatorBackwardSecondLevel_destroy(ICU4XCollatorBackwardSecondLevel* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCollatorCaseFirst.h b/intl/icu_capi/c/include/ICU4XCollatorCaseFirst.h new file mode 100644 index 0000000000..c01eb216d0 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCollatorCaseFirst.h @@ -0,0 +1,33 @@ +#ifndef ICU4XCollatorCaseFirst_H +#define ICU4XCollatorCaseFirst_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XCollatorCaseFirst { + ICU4XCollatorCaseFirst_Auto = 0, + ICU4XCollatorCaseFirst_Off = 1, + ICU4XCollatorCaseFirst_LowerFirst = 2, + ICU4XCollatorCaseFirst_UpperFirst = 3, +} ICU4XCollatorCaseFirst; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XCollatorCaseFirst_destroy(ICU4XCollatorCaseFirst* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCollatorCaseLevel.h b/intl/icu_capi/c/include/ICU4XCollatorCaseLevel.h new file mode 100644 index 0000000000..cbf6865967 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCollatorCaseLevel.h @@ -0,0 +1,32 @@ +#ifndef ICU4XCollatorCaseLevel_H +#define ICU4XCollatorCaseLevel_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XCollatorCaseLevel { + ICU4XCollatorCaseLevel_Auto = 0, + ICU4XCollatorCaseLevel_Off = 1, + ICU4XCollatorCaseLevel_On = 2, +} ICU4XCollatorCaseLevel; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XCollatorCaseLevel_destroy(ICU4XCollatorCaseLevel* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCollatorMaxVariable.h b/intl/icu_capi/c/include/ICU4XCollatorMaxVariable.h new file mode 100644 index 0000000000..0e5a3a516f --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCollatorMaxVariable.h @@ -0,0 +1,34 @@ +#ifndef ICU4XCollatorMaxVariable_H +#define ICU4XCollatorMaxVariable_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XCollatorMaxVariable { + ICU4XCollatorMaxVariable_Auto = 0, + ICU4XCollatorMaxVariable_Space = 1, + ICU4XCollatorMaxVariable_Punctuation = 2, + ICU4XCollatorMaxVariable_Symbol = 3, + ICU4XCollatorMaxVariable_Currency = 4, +} ICU4XCollatorMaxVariable; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XCollatorMaxVariable_destroy(ICU4XCollatorMaxVariable* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCollatorNumeric.h b/intl/icu_capi/c/include/ICU4XCollatorNumeric.h new file mode 100644 index 0000000000..4dd2ec0408 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCollatorNumeric.h @@ -0,0 +1,32 @@ +#ifndef ICU4XCollatorNumeric_H +#define ICU4XCollatorNumeric_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XCollatorNumeric { + ICU4XCollatorNumeric_Auto = 0, + ICU4XCollatorNumeric_Off = 1, + ICU4XCollatorNumeric_On = 2, +} ICU4XCollatorNumeric; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XCollatorNumeric_destroy(ICU4XCollatorNumeric* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCollatorOptionsV1.h b/intl/icu_capi/c/include/ICU4XCollatorOptionsV1.h new file mode 100644 index 0000000000..dc73557efe --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCollatorOptionsV1.h @@ -0,0 +1,50 @@ +#ifndef ICU4XCollatorOptionsV1_H +#define ICU4XCollatorOptionsV1_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#include "ICU4XCollatorStrength.h" +#include "ICU4XCollatorAlternateHandling.h" +#include "ICU4XCollatorCaseFirst.h" +#include "ICU4XCollatorMaxVariable.h" +#include "ICU4XCollatorCaseLevel.h" +#include "ICU4XCollatorNumeric.h" +#include "ICU4XCollatorBackwardSecondLevel.h" +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XCollatorOptionsV1 { + ICU4XCollatorStrength strength; + ICU4XCollatorAlternateHandling alternate_handling; + ICU4XCollatorCaseFirst case_first; + ICU4XCollatorMaxVariable max_variable; + ICU4XCollatorCaseLevel case_level; + ICU4XCollatorNumeric numeric; + ICU4XCollatorBackwardSecondLevel backward_second_level; +} ICU4XCollatorOptionsV1; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XCollatorStrength.h" +#include "ICU4XCollatorAlternateHandling.h" +#include "ICU4XCollatorCaseFirst.h" +#include "ICU4XCollatorMaxVariable.h" +#include "ICU4XCollatorCaseLevel.h" +#include "ICU4XCollatorNumeric.h" +#include "ICU4XCollatorBackwardSecondLevel.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XCollatorOptionsV1_destroy(ICU4XCollatorOptionsV1* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCollatorStrength.h b/intl/icu_capi/c/include/ICU4XCollatorStrength.h new file mode 100644 index 0000000000..f230214feb --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCollatorStrength.h @@ -0,0 +1,35 @@ +#ifndef ICU4XCollatorStrength_H +#define ICU4XCollatorStrength_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XCollatorStrength { + ICU4XCollatorStrength_Auto = 0, + ICU4XCollatorStrength_Primary = 1, + ICU4XCollatorStrength_Secondary = 2, + ICU4XCollatorStrength_Tertiary = 3, + ICU4XCollatorStrength_Quaternary = 4, + ICU4XCollatorStrength_Identical = 5, +} ICU4XCollatorStrength; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XCollatorStrength_destroy(ICU4XCollatorStrength* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XComposingNormalizer.h b/intl/icu_capi/c/include/ICU4XComposingNormalizer.h new file mode 100644 index 0000000000..1798af0d8e --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XComposingNormalizer.h @@ -0,0 +1,38 @@ +#ifndef ICU4XComposingNormalizer_H +#define ICU4XComposingNormalizer_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XComposingNormalizer ICU4XComposingNormalizer; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h" +#include "diplomat_result_void_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XComposingNormalizer_ICU4XError ICU4XComposingNormalizer_create_nfc(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XComposingNormalizer_ICU4XError ICU4XComposingNormalizer_create_nfkc(const ICU4XDataProvider* provider); + +diplomat_result_void_ICU4XError ICU4XComposingNormalizer_normalize(const ICU4XComposingNormalizer* self, const char* s_data, size_t s_len, DiplomatWriteable* write); + +bool ICU4XComposingNormalizer_is_normalized(const ICU4XComposingNormalizer* self, const char* s_data, size_t s_len); +void ICU4XComposingNormalizer_destroy(ICU4XComposingNormalizer* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XCustomTimeZone.h b/intl/icu_capi/c/include/ICU4XCustomTimeZone.h new file mode 100644 index 0000000000..422b7fa382 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XCustomTimeZone.h @@ -0,0 +1,84 @@ +#ifndef ICU4XCustomTimeZone_H +#define ICU4XCustomTimeZone_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XCustomTimeZone ICU4XCustomTimeZone; +#ifdef __cplusplus +} // namespace capi +#endif +#include "diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h" +#include "diplomat_result_void_ICU4XError.h" +#include "diplomat_result_int32_t_ICU4XError.h" +#include "diplomat_result_bool_ICU4XError.h" +#include "ICU4XIanaToBcp47Mapper.h" +#include "ICU4XMetazoneCalculator.h" +#include "ICU4XIsoDateTime.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XCustomTimeZone_ICU4XError ICU4XCustomTimeZone_create_from_string(const char* s_data, size_t s_len); + +ICU4XCustomTimeZone* ICU4XCustomTimeZone_create_empty(); + +ICU4XCustomTimeZone* ICU4XCustomTimeZone_create_utc(); + +diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_gmt_offset_seconds(ICU4XCustomTimeZone* self, int32_t offset_seconds); + +void ICU4XCustomTimeZone_clear_gmt_offset(ICU4XCustomTimeZone* self); + +diplomat_result_int32_t_ICU4XError ICU4XCustomTimeZone_gmt_offset_seconds(const ICU4XCustomTimeZone* self); + +diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_is_gmt_offset_positive(const ICU4XCustomTimeZone* self); + +diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_is_gmt_offset_zero(const ICU4XCustomTimeZone* self); + +diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_gmt_offset_has_minutes(const ICU4XCustomTimeZone* self); + +diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_gmt_offset_has_seconds(const ICU4XCustomTimeZone* self); + +diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_time_zone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len); + +diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_iana_time_zone_id(ICU4XCustomTimeZone* self, const ICU4XIanaToBcp47Mapper* mapper, const char* id_data, size_t id_len); + +void ICU4XCustomTimeZone_clear_time_zone_id(ICU4XCustomTimeZone* self); + +diplomat_result_void_ICU4XError ICU4XCustomTimeZone_time_zone_id(const ICU4XCustomTimeZone* self, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_metazone_id(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len); + +void ICU4XCustomTimeZone_clear_metazone_id(ICU4XCustomTimeZone* self); + +diplomat_result_void_ICU4XError ICU4XCustomTimeZone_metazone_id(const ICU4XCustomTimeZone* self, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_zone_variant(ICU4XCustomTimeZone* self, const char* id_data, size_t id_len); + +void ICU4XCustomTimeZone_clear_zone_variant(ICU4XCustomTimeZone* self); + +diplomat_result_void_ICU4XError ICU4XCustomTimeZone_zone_variant(const ICU4XCustomTimeZone* self, DiplomatWriteable* write); + +void ICU4XCustomTimeZone_set_standard_time(ICU4XCustomTimeZone* self); + +void ICU4XCustomTimeZone_set_daylight_time(ICU4XCustomTimeZone* self); + +diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_is_standard_time(const ICU4XCustomTimeZone* self); + +diplomat_result_bool_ICU4XError ICU4XCustomTimeZone_is_daylight_time(const ICU4XCustomTimeZone* self); + +void ICU4XCustomTimeZone_maybe_calculate_metazone(ICU4XCustomTimeZone* self, const ICU4XMetazoneCalculator* metazone_calculator, const ICU4XIsoDateTime* local_datetime); +void ICU4XCustomTimeZone_destroy(ICU4XCustomTimeZone* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XDataProvider.h b/intl/icu_capi/c/include/ICU4XDataProvider.h new file mode 100644 index 0000000000..8d7700e224 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XDataProvider.h @@ -0,0 +1,48 @@ +#ifndef ICU4XDataProvider_H +#define ICU4XDataProvider_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XDataProvider ICU4XDataProvider; +#ifdef __cplusplus +} // namespace capi +#endif +#include "diplomat_result_box_ICU4XDataProvider_ICU4XError.h" +#include "diplomat_result_void_ICU4XError.h" +#include "ICU4XLocaleFallbacker.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +ICU4XDataProvider* ICU4XDataProvider_create_compiled(); + +diplomat_result_box_ICU4XDataProvider_ICU4XError ICU4XDataProvider_create_fs(const char* path_data, size_t path_len); + +ICU4XDataProvider* ICU4XDataProvider_create_test(); + +diplomat_result_box_ICU4XDataProvider_ICU4XError ICU4XDataProvider_create_from_byte_slice(const uint8_t* blob_data, size_t blob_len); + +ICU4XDataProvider* ICU4XDataProvider_create_empty(); + +diplomat_result_void_ICU4XError ICU4XDataProvider_fork_by_key(ICU4XDataProvider* self, ICU4XDataProvider* other); + +diplomat_result_void_ICU4XError ICU4XDataProvider_fork_by_locale(ICU4XDataProvider* self, ICU4XDataProvider* other); + +diplomat_result_void_ICU4XError ICU4XDataProvider_enable_locale_fallback(ICU4XDataProvider* self); + +diplomat_result_void_ICU4XError ICU4XDataProvider_enable_locale_fallback_with(ICU4XDataProvider* self, const ICU4XLocaleFallbacker* fallbacker); +void ICU4XDataProvider_destroy(ICU4XDataProvider* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XDataStruct.h b/intl/icu_capi/c/include/ICU4XDataStruct.h new file mode 100644 index 0000000000..a07ff02fb8 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XDataStruct.h @@ -0,0 +1,30 @@ +#ifndef ICU4XDataStruct_H +#define ICU4XDataStruct_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XDataStruct ICU4XDataStruct; +#ifdef __cplusplus +} // namespace capi +#endif +#include "diplomat_result_box_ICU4XDataStruct_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XDataStruct_ICU4XError ICU4XDataStruct_create_decimal_symbols_v1(const char* plus_sign_prefix_data, size_t plus_sign_prefix_len, const char* plus_sign_suffix_data, size_t plus_sign_suffix_len, const char* minus_sign_prefix_data, size_t minus_sign_prefix_len, const char* minus_sign_suffix_data, size_t minus_sign_suffix_len, const char* decimal_separator_data, size_t decimal_separator_len, const char* grouping_separator_data, size_t grouping_separator_len, uint8_t primary_group_size, uint8_t secondary_group_size, uint8_t min_group_size, const char32_t* digits_data, size_t digits_len); +void ICU4XDataStruct_destroy(ICU4XDataStruct* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XDate.h b/intl/icu_capi/c/include/ICU4XDate.h new file mode 100644 index 0000000000..f5a0c06de6 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XDate.h @@ -0,0 +1,66 @@ +#ifndef ICU4XDate_H +#define ICU4XDate_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XDate ICU4XDate; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XCalendar.h" +#include "diplomat_result_box_ICU4XDate_ICU4XError.h" +#include "ICU4XIsoDate.h" +#include "ICU4XIsoWeekday.h" +#include "ICU4XWeekCalculator.h" +#include "diplomat_result_ICU4XWeekOf_ICU4XError.h" +#include "diplomat_result_void_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XDate_ICU4XError ICU4XDate_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar* calendar); + +diplomat_result_box_ICU4XDate_ICU4XError ICU4XDate_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, const ICU4XCalendar* calendar); + +ICU4XDate* ICU4XDate_to_calendar(const ICU4XDate* self, const ICU4XCalendar* calendar); + +ICU4XIsoDate* ICU4XDate_to_iso(const ICU4XDate* self); + +uint32_t ICU4XDate_day_of_month(const ICU4XDate* self); + +ICU4XIsoWeekday ICU4XDate_day_of_week(const ICU4XDate* self); + +uint32_t ICU4XDate_week_of_month(const ICU4XDate* self, ICU4XIsoWeekday first_weekday); + +diplomat_result_ICU4XWeekOf_ICU4XError ICU4XDate_week_of_year(const ICU4XDate* self, const ICU4XWeekCalculator* calculator); + +uint32_t ICU4XDate_ordinal_month(const ICU4XDate* self); + +diplomat_result_void_ICU4XError ICU4XDate_month_code(const ICU4XDate* self, DiplomatWriteable* write); + +int32_t ICU4XDate_year_in_era(const ICU4XDate* self); + +diplomat_result_void_ICU4XError ICU4XDate_era(const ICU4XDate* self, DiplomatWriteable* write); + +uint8_t ICU4XDate_months_in_year(const ICU4XDate* self); + +uint8_t ICU4XDate_days_in_month(const ICU4XDate* self); + +uint16_t ICU4XDate_days_in_year(const ICU4XDate* self); + +ICU4XCalendar* ICU4XDate_calendar(const ICU4XDate* self); +void ICU4XDate_destroy(ICU4XDate* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XDateFormatter.h b/intl/icu_capi/c/include/ICU4XDateFormatter.h new file mode 100644 index 0000000000..8dc5316e47 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XDateFormatter.h @@ -0,0 +1,46 @@ +#ifndef ICU4XDateFormatter_H +#define ICU4XDateFormatter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XDateFormatter ICU4XDateFormatter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "ICU4XDateLength.h" +#include "diplomat_result_box_ICU4XDateFormatter_ICU4XError.h" +#include "ICU4XDate.h" +#include "diplomat_result_void_ICU4XError.h" +#include "ICU4XIsoDate.h" +#include "ICU4XDateTime.h" +#include "ICU4XIsoDateTime.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XDateFormatter_ICU4XError ICU4XDateFormatter_create_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length); + +diplomat_result_void_ICU4XError ICU4XDateFormatter_format_date(const ICU4XDateFormatter* self, const ICU4XDate* value, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XDateFormatter_format_iso_date(const ICU4XDateFormatter* self, const ICU4XIsoDate* value, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XDateFormatter_format_datetime(const ICU4XDateFormatter* self, const ICU4XDateTime* value, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XDateFormatter_format_iso_datetime(const ICU4XDateFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write); +void ICU4XDateFormatter_destroy(ICU4XDateFormatter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XDateLength.h b/intl/icu_capi/c/include/ICU4XDateLength.h new file mode 100644 index 0000000000..b2ca918233 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XDateLength.h @@ -0,0 +1,33 @@ +#ifndef ICU4XDateLength_H +#define ICU4XDateLength_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XDateLength { + ICU4XDateLength_Full = 0, + ICU4XDateLength_Long = 1, + ICU4XDateLength_Medium = 2, + ICU4XDateLength_Short = 3, +} ICU4XDateLength; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XDateLength_destroy(ICU4XDateLength* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XDateTime.h b/intl/icu_capi/c/include/ICU4XDateTime.h new file mode 100644 index 0000000000..adb0a19798 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XDateTime.h @@ -0,0 +1,82 @@ +#ifndef ICU4XDateTime_H +#define ICU4XDateTime_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XDateTime ICU4XDateTime; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XCalendar.h" +#include "diplomat_result_box_ICU4XDateTime_ICU4XError.h" +#include "ICU4XDate.h" +#include "ICU4XTime.h" +#include "ICU4XIsoDateTime.h" +#include "ICU4XIsoWeekday.h" +#include "ICU4XWeekCalculator.h" +#include "diplomat_result_ICU4XWeekOf_ICU4XError.h" +#include "diplomat_result_void_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XDateTime_ICU4XError ICU4XDateTime_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar); + +diplomat_result_box_ICU4XDateTime_ICU4XError ICU4XDateTime_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar* calendar); + +ICU4XDateTime* ICU4XDateTime_create_from_date_and_time(const ICU4XDate* date, const ICU4XTime* time); + +ICU4XDate* ICU4XDateTime_date(const ICU4XDateTime* self); + +ICU4XTime* ICU4XDateTime_time(const ICU4XDateTime* self); + +ICU4XIsoDateTime* ICU4XDateTime_to_iso(const ICU4XDateTime* self); + +ICU4XDateTime* ICU4XDateTime_to_calendar(const ICU4XDateTime* self, const ICU4XCalendar* calendar); + +uint8_t ICU4XDateTime_hour(const ICU4XDateTime* self); + +uint8_t ICU4XDateTime_minute(const ICU4XDateTime* self); + +uint8_t ICU4XDateTime_second(const ICU4XDateTime* self); + +uint32_t ICU4XDateTime_nanosecond(const ICU4XDateTime* self); + +uint32_t ICU4XDateTime_day_of_month(const ICU4XDateTime* self); + +ICU4XIsoWeekday ICU4XDateTime_day_of_week(const ICU4XDateTime* self); + +uint32_t ICU4XDateTime_week_of_month(const ICU4XDateTime* self, ICU4XIsoWeekday first_weekday); + +diplomat_result_ICU4XWeekOf_ICU4XError ICU4XDateTime_week_of_year(const ICU4XDateTime* self, const ICU4XWeekCalculator* calculator); + +uint32_t ICU4XDateTime_ordinal_month(const ICU4XDateTime* self); + +diplomat_result_void_ICU4XError ICU4XDateTime_month_code(const ICU4XDateTime* self, DiplomatWriteable* write); + +int32_t ICU4XDateTime_year_in_era(const ICU4XDateTime* self); + +diplomat_result_void_ICU4XError ICU4XDateTime_era(const ICU4XDateTime* self, DiplomatWriteable* write); + +uint8_t ICU4XDateTime_months_in_year(const ICU4XDateTime* self); + +uint8_t ICU4XDateTime_days_in_month(const ICU4XDateTime* self); + +uint16_t ICU4XDateTime_days_in_year(const ICU4XDateTime* self); + +ICU4XCalendar* ICU4XDateTime_calendar(const ICU4XDateTime* self); +void ICU4XDateTime_destroy(ICU4XDateTime* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XDateTimeFormatter.h b/intl/icu_capi/c/include/ICU4XDateTimeFormatter.h new file mode 100644 index 0000000000..5f0af4ddba --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XDateTimeFormatter.h @@ -0,0 +1,41 @@ +#ifndef ICU4XDateTimeFormatter_H +#define ICU4XDateTimeFormatter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XDateTimeFormatter ICU4XDateTimeFormatter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "ICU4XDateLength.h" +#include "ICU4XTimeLength.h" +#include "diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h" +#include "ICU4XDateTime.h" +#include "diplomat_result_void_ICU4XError.h" +#include "ICU4XIsoDateTime.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError ICU4XDateTimeFormatter_create_with_lengths(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length); + +diplomat_result_void_ICU4XError ICU4XDateTimeFormatter_format_datetime(const ICU4XDateTimeFormatter* self, const ICU4XDateTime* value, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XDateTimeFormatter_format_iso_datetime(const ICU4XDateTimeFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write); +void ICU4XDateTimeFormatter_destroy(ICU4XDateTimeFormatter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XDecomposed.h b/intl/icu_capi/c/include/ICU4XDecomposed.h new file mode 100644 index 0000000000..3f287e8192 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XDecomposed.h @@ -0,0 +1,31 @@ +#ifndef ICU4XDecomposed_H +#define ICU4XDecomposed_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XDecomposed { + char32_t first; + char32_t second; +} ICU4XDecomposed; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XDecomposed_destroy(ICU4XDecomposed* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XDecomposingNormalizer.h b/intl/icu_capi/c/include/ICU4XDecomposingNormalizer.h new file mode 100644 index 0000000000..f542f7a730 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XDecomposingNormalizer.h @@ -0,0 +1,38 @@ +#ifndef ICU4XDecomposingNormalizer_H +#define ICU4XDecomposingNormalizer_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XDecomposingNormalizer ICU4XDecomposingNormalizer; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h" +#include "diplomat_result_void_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError ICU4XDecomposingNormalizer_create_nfd(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError ICU4XDecomposingNormalizer_create_nfkd(const ICU4XDataProvider* provider); + +diplomat_result_void_ICU4XError ICU4XDecomposingNormalizer_normalize(const ICU4XDecomposingNormalizer* self, const char* s_data, size_t s_len, DiplomatWriteable* write); + +bool ICU4XDecomposingNormalizer_is_normalized(const ICU4XDecomposingNormalizer* self, const char* s_data, size_t s_len); +void ICU4XDecomposingNormalizer_destroy(ICU4XDecomposingNormalizer* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XDisplayNamesFallback.h b/intl/icu_capi/c/include/ICU4XDisplayNamesFallback.h new file mode 100644 index 0000000000..085fc8de5d --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XDisplayNamesFallback.h @@ -0,0 +1,31 @@ +#ifndef ICU4XDisplayNamesFallback_H +#define ICU4XDisplayNamesFallback_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XDisplayNamesFallback { + ICU4XDisplayNamesFallback_Code = 0, + ICU4XDisplayNamesFallback_None = 1, +} ICU4XDisplayNamesFallback; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XDisplayNamesFallback_destroy(ICU4XDisplayNamesFallback* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XDisplayNamesOptionsV1.h b/intl/icu_capi/c/include/ICU4XDisplayNamesOptionsV1.h new file mode 100644 index 0000000000..e998cde0e7 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XDisplayNamesOptionsV1.h @@ -0,0 +1,38 @@ +#ifndef ICU4XDisplayNamesOptionsV1_H +#define ICU4XDisplayNamesOptionsV1_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#include "ICU4XDisplayNamesStyle.h" +#include "ICU4XDisplayNamesFallback.h" +#include "ICU4XLanguageDisplay.h" +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XDisplayNamesOptionsV1 { + ICU4XDisplayNamesStyle style; + ICU4XDisplayNamesFallback fallback; + ICU4XLanguageDisplay language_display; +} ICU4XDisplayNamesOptionsV1; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDisplayNamesStyle.h" +#include "ICU4XDisplayNamesFallback.h" +#include "ICU4XLanguageDisplay.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XDisplayNamesOptionsV1_destroy(ICU4XDisplayNamesOptionsV1* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XDisplayNamesStyle.h b/intl/icu_capi/c/include/ICU4XDisplayNamesStyle.h new file mode 100644 index 0000000000..048da455da --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XDisplayNamesStyle.h @@ -0,0 +1,34 @@ +#ifndef ICU4XDisplayNamesStyle_H +#define ICU4XDisplayNamesStyle_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XDisplayNamesStyle { + ICU4XDisplayNamesStyle_Auto = 0, + ICU4XDisplayNamesStyle_Narrow = 1, + ICU4XDisplayNamesStyle_Short = 2, + ICU4XDisplayNamesStyle_Long = 3, + ICU4XDisplayNamesStyle_Menu = 4, +} ICU4XDisplayNamesStyle; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XDisplayNamesStyle_destroy(ICU4XDisplayNamesStyle* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XError.h b/intl/icu_capi/c/include/ICU4XError.h new file mode 100644 index 0000000000..8836275ac5 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XError.h @@ -0,0 +1,84 @@ +#ifndef ICU4XError_H +#define ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XError { + ICU4XError_UnknownError = 0, + ICU4XError_WriteableError = 1, + ICU4XError_OutOfBoundsError = 2, + ICU4XError_DataMissingDataKeyError = 256, + ICU4XError_DataMissingVariantError = 257, + ICU4XError_DataMissingLocaleError = 258, + ICU4XError_DataNeedsVariantError = 259, + ICU4XError_DataNeedsLocaleError = 260, + ICU4XError_DataExtraneousLocaleError = 261, + ICU4XError_DataFilteredResourceError = 262, + ICU4XError_DataMismatchedTypeError = 263, + ICU4XError_DataMissingPayloadError = 264, + ICU4XError_DataInvalidStateError = 265, + ICU4XError_DataCustomError = 266, + ICU4XError_DataIoError = 267, + ICU4XError_DataUnavailableBufferFormatError = 268, + ICU4XError_DataMismatchedAnyBufferError = 269, + ICU4XError_LocaleUndefinedSubtagError = 512, + ICU4XError_LocaleParserLanguageError = 513, + ICU4XError_LocaleParserSubtagError = 514, + ICU4XError_LocaleParserExtensionError = 515, + ICU4XError_DataStructValidityError = 768, + ICU4XError_PropertyUnknownScriptIdError = 1024, + ICU4XError_PropertyUnknownGeneralCategoryGroupError = 1025, + ICU4XError_PropertyUnexpectedPropertyNameError = 1026, + ICU4XError_FixedDecimalLimitError = 1280, + ICU4XError_FixedDecimalSyntaxError = 1281, + ICU4XError_PluralsParserError = 1536, + ICU4XError_CalendarParseError = 1792, + ICU4XError_CalendarOverflowError = 1793, + ICU4XError_CalendarUnderflowError = 1794, + ICU4XError_CalendarOutOfRangeError = 1795, + ICU4XError_CalendarUnknownEraError = 1796, + ICU4XError_CalendarUnknownMonthCodeError = 1797, + ICU4XError_CalendarMissingInputError = 1798, + ICU4XError_CalendarUnknownKindError = 1799, + ICU4XError_CalendarMissingError = 1800, + ICU4XError_DateTimePatternError = 2048, + ICU4XError_DateTimeMissingInputFieldError = 2049, + ICU4XError_DateTimeSkeletonError = 2050, + ICU4XError_DateTimeUnsupportedFieldError = 2051, + ICU4XError_DateTimeUnsupportedOptionsError = 2052, + ICU4XError_DateTimeMissingWeekdaySymbolError = 2053, + ICU4XError_DateTimeMissingMonthSymbolError = 2054, + ICU4XError_DateTimeFixedDecimalError = 2055, + ICU4XError_DateTimeMismatchedCalendarError = 2056, + ICU4XError_TinyStrTooLargeError = 2304, + ICU4XError_TinyStrContainsNullError = 2305, + ICU4XError_TinyStrNonAsciiError = 2306, + ICU4XError_TimeZoneOffsetOutOfBoundsError = 2560, + ICU4XError_TimeZoneInvalidOffsetError = 2561, + ICU4XError_TimeZoneMissingInputError = 2562, + ICU4XError_TimeZoneInvalidIdError = 2563, + ICU4XError_NormalizerFutureExtensionError = 2816, + ICU4XError_NormalizerValidationError = 2817, +} ICU4XError; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XError_destroy(ICU4XError* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XFixedDecimal.h b/intl/icu_capi/c/include/ICU4XFixedDecimal.h new file mode 100644 index 0000000000..361294b687 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XFixedDecimal.h @@ -0,0 +1,101 @@ +#ifndef ICU4XFixedDecimal_H +#define ICU4XFixedDecimal_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XFixedDecimal ICU4XFixedDecimal; +#ifdef __cplusplus +} // namespace capi +#endif +#include "diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h" +#include "ICU4XFixedDecimalSign.h" +#include "ICU4XFixedDecimalSignDisplay.h" +#include "diplomat_result_void_void.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_i32(int32_t v); + +ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_u32(uint32_t v); + +ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_i64(int64_t v); + +ICU4XFixedDecimal* ICU4XFixedDecimal_create_from_u64(uint64_t v); + +diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_integer_precision(double f); + +diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_lower_magnitude(double f, int16_t magnitude); + +diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_significant_digits(double f, uint8_t digits); + +diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_f64_with_floating_precision(double f); + +diplomat_result_box_ICU4XFixedDecimal_ICU4XError ICU4XFixedDecimal_create_from_string(const char* v_data, size_t v_len); + +uint8_t ICU4XFixedDecimal_digit_at(const ICU4XFixedDecimal* self, int16_t magnitude); + +int16_t ICU4XFixedDecimal_magnitude_start(const ICU4XFixedDecimal* self); + +int16_t ICU4XFixedDecimal_magnitude_end(const ICU4XFixedDecimal* self); + +int16_t ICU4XFixedDecimal_nonzero_magnitude_start(const ICU4XFixedDecimal* self); + +int16_t ICU4XFixedDecimal_nonzero_magnitude_end(const ICU4XFixedDecimal* self); + +bool ICU4XFixedDecimal_is_zero(const ICU4XFixedDecimal* self); + +void ICU4XFixedDecimal_multiply_pow10(ICU4XFixedDecimal* self, int16_t power); + +ICU4XFixedDecimalSign ICU4XFixedDecimal_sign(const ICU4XFixedDecimal* self); + +void ICU4XFixedDecimal_set_sign(ICU4XFixedDecimal* self, ICU4XFixedDecimalSign sign); + +void ICU4XFixedDecimal_apply_sign_display(ICU4XFixedDecimal* self, ICU4XFixedDecimalSignDisplay sign_display); + +void ICU4XFixedDecimal_trim_start(ICU4XFixedDecimal* self); + +void ICU4XFixedDecimal_trim_end(ICU4XFixedDecimal* self); + +void ICU4XFixedDecimal_pad_start(ICU4XFixedDecimal* self, int16_t position); + +void ICU4XFixedDecimal_pad_end(ICU4XFixedDecimal* self, int16_t position); + +void ICU4XFixedDecimal_set_max_position(ICU4XFixedDecimal* self, int16_t position); + +void ICU4XFixedDecimal_trunc(ICU4XFixedDecimal* self, int16_t position); + +void ICU4XFixedDecimal_half_trunc(ICU4XFixedDecimal* self, int16_t position); + +void ICU4XFixedDecimal_expand(ICU4XFixedDecimal* self, int16_t position); + +void ICU4XFixedDecimal_half_expand(ICU4XFixedDecimal* self, int16_t position); + +void ICU4XFixedDecimal_ceil(ICU4XFixedDecimal* self, int16_t position); + +void ICU4XFixedDecimal_half_ceil(ICU4XFixedDecimal* self, int16_t position); + +void ICU4XFixedDecimal_floor(ICU4XFixedDecimal* self, int16_t position); + +void ICU4XFixedDecimal_half_floor(ICU4XFixedDecimal* self, int16_t position); + +void ICU4XFixedDecimal_half_even(ICU4XFixedDecimal* self, int16_t position); + +diplomat_result_void_void ICU4XFixedDecimal_concatenate_end(ICU4XFixedDecimal* self, ICU4XFixedDecimal* other); + +void ICU4XFixedDecimal_to_string(const ICU4XFixedDecimal* self, DiplomatWriteable* to); +void ICU4XFixedDecimal_destroy(ICU4XFixedDecimal* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XFixedDecimalFormatter.h b/intl/icu_capi/c/include/ICU4XFixedDecimalFormatter.h new file mode 100644 index 0000000000..aa1cfd6a48 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XFixedDecimalFormatter.h @@ -0,0 +1,40 @@ +#ifndef ICU4XFixedDecimalFormatter_H +#define ICU4XFixedDecimalFormatter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XFixedDecimalFormatter ICU4XFixedDecimalFormatter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "ICU4XFixedDecimalGroupingStrategy.h" +#include "diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h" +#include "ICU4XDataStruct.h" +#include "ICU4XFixedDecimal.h" +#include "diplomat_result_void_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError ICU4XFixedDecimalFormatter_create_with_grouping_strategy(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XFixedDecimalGroupingStrategy grouping_strategy); + +diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError ICU4XFixedDecimalFormatter_create_with_decimal_symbols_v1(const ICU4XDataStruct* data_struct, ICU4XFixedDecimalGroupingStrategy grouping_strategy); + +diplomat_result_void_ICU4XError ICU4XFixedDecimalFormatter_format(const ICU4XFixedDecimalFormatter* self, const ICU4XFixedDecimal* value, DiplomatWriteable* write); +void ICU4XFixedDecimalFormatter_destroy(ICU4XFixedDecimalFormatter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XFixedDecimalGroupingStrategy.h b/intl/icu_capi/c/include/ICU4XFixedDecimalGroupingStrategy.h new file mode 100644 index 0000000000..7648892cc5 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XFixedDecimalGroupingStrategy.h @@ -0,0 +1,33 @@ +#ifndef ICU4XFixedDecimalGroupingStrategy_H +#define ICU4XFixedDecimalGroupingStrategy_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XFixedDecimalGroupingStrategy { + ICU4XFixedDecimalGroupingStrategy_Auto = 0, + ICU4XFixedDecimalGroupingStrategy_Never = 1, + ICU4XFixedDecimalGroupingStrategy_Always = 2, + ICU4XFixedDecimalGroupingStrategy_Min2 = 3, +} ICU4XFixedDecimalGroupingStrategy; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XFixedDecimalGroupingStrategy_destroy(ICU4XFixedDecimalGroupingStrategy* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XFixedDecimalSign.h b/intl/icu_capi/c/include/ICU4XFixedDecimalSign.h new file mode 100644 index 0000000000..12fff3cf1c --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XFixedDecimalSign.h @@ -0,0 +1,32 @@ +#ifndef ICU4XFixedDecimalSign_H +#define ICU4XFixedDecimalSign_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XFixedDecimalSign { + ICU4XFixedDecimalSign_None = 0, + ICU4XFixedDecimalSign_Negative = 1, + ICU4XFixedDecimalSign_Positive = 2, +} ICU4XFixedDecimalSign; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XFixedDecimalSign_destroy(ICU4XFixedDecimalSign* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XFixedDecimalSignDisplay.h b/intl/icu_capi/c/include/ICU4XFixedDecimalSignDisplay.h new file mode 100644 index 0000000000..8c2612e516 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XFixedDecimalSignDisplay.h @@ -0,0 +1,34 @@ +#ifndef ICU4XFixedDecimalSignDisplay_H +#define ICU4XFixedDecimalSignDisplay_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XFixedDecimalSignDisplay { + ICU4XFixedDecimalSignDisplay_Auto = 0, + ICU4XFixedDecimalSignDisplay_Never = 1, + ICU4XFixedDecimalSignDisplay_Always = 2, + ICU4XFixedDecimalSignDisplay_ExceptZero = 3, + ICU4XFixedDecimalSignDisplay_Negative = 4, +} ICU4XFixedDecimalSignDisplay; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XFixedDecimalSignDisplay_destroy(ICU4XFixedDecimalSignDisplay* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XGeneralCategoryNameToMaskMapper.h b/intl/icu_capi/c/include/ICU4XGeneralCategoryNameToMaskMapper.h new file mode 100644 index 0000000000..3a4e2d4d13 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XGeneralCategoryNameToMaskMapper.h @@ -0,0 +1,35 @@ +#ifndef ICU4XGeneralCategoryNameToMaskMapper_H +#define ICU4XGeneralCategoryNameToMaskMapper_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XGeneralCategoryNameToMaskMapper ICU4XGeneralCategoryNameToMaskMapper; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +uint32_t ICU4XGeneralCategoryNameToMaskMapper_get_strict(const ICU4XGeneralCategoryNameToMaskMapper* self, const char* name_data, size_t name_len); + +uint32_t ICU4XGeneralCategoryNameToMaskMapper_get_loose(const ICU4XGeneralCategoryNameToMaskMapper* self, const char* name_data, size_t name_len); + +diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError ICU4XGeneralCategoryNameToMaskMapper_load(const ICU4XDataProvider* provider); +void ICU4XGeneralCategoryNameToMaskMapper_destroy(ICU4XGeneralCategoryNameToMaskMapper* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorLatin1.h b/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorLatin1.h new file mode 100644 index 0000000000..9e23489fd3 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorLatin1.h @@ -0,0 +1,29 @@ +#ifndef ICU4XGraphemeClusterBreakIteratorLatin1_H +#define ICU4XGraphemeClusterBreakIteratorLatin1_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XGraphemeClusterBreakIteratorLatin1 ICU4XGraphemeClusterBreakIteratorLatin1; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +int32_t ICU4XGraphemeClusterBreakIteratorLatin1_next(ICU4XGraphemeClusterBreakIteratorLatin1* self); +void ICU4XGraphemeClusterBreakIteratorLatin1_destroy(ICU4XGraphemeClusterBreakIteratorLatin1* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf16.h b/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf16.h new file mode 100644 index 0000000000..f0de4c0214 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf16.h @@ -0,0 +1,29 @@ +#ifndef ICU4XGraphemeClusterBreakIteratorUtf16_H +#define ICU4XGraphemeClusterBreakIteratorUtf16_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XGraphemeClusterBreakIteratorUtf16 ICU4XGraphemeClusterBreakIteratorUtf16; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +int32_t ICU4XGraphemeClusterBreakIteratorUtf16_next(ICU4XGraphemeClusterBreakIteratorUtf16* self); +void ICU4XGraphemeClusterBreakIteratorUtf16_destroy(ICU4XGraphemeClusterBreakIteratorUtf16* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf8.h b/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf8.h new file mode 100644 index 0000000000..331b17eac7 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XGraphemeClusterBreakIteratorUtf8.h @@ -0,0 +1,29 @@ +#ifndef ICU4XGraphemeClusterBreakIteratorUtf8_H +#define ICU4XGraphemeClusterBreakIteratorUtf8_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XGraphemeClusterBreakIteratorUtf8 ICU4XGraphemeClusterBreakIteratorUtf8; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +int32_t ICU4XGraphemeClusterBreakIteratorUtf8_next(ICU4XGraphemeClusterBreakIteratorUtf8* self); +void ICU4XGraphemeClusterBreakIteratorUtf8_destroy(ICU4XGraphemeClusterBreakIteratorUtf8* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XGraphemeClusterSegmenter.h b/intl/icu_capi/c/include/ICU4XGraphemeClusterSegmenter.h new file mode 100644 index 0000000000..1805090bfb --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XGraphemeClusterSegmenter.h @@ -0,0 +1,40 @@ +#ifndef ICU4XGraphemeClusterSegmenter_H +#define ICU4XGraphemeClusterSegmenter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XGraphemeClusterSegmenter ICU4XGraphemeClusterSegmenter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h" +#include "ICU4XGraphemeClusterBreakIteratorUtf8.h" +#include "ICU4XGraphemeClusterBreakIteratorUtf16.h" +#include "ICU4XGraphemeClusterBreakIteratorLatin1.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError ICU4XGraphemeClusterSegmenter_create(const ICU4XDataProvider* provider); + +ICU4XGraphemeClusterBreakIteratorUtf8* ICU4XGraphemeClusterSegmenter_segment_utf8(const ICU4XGraphemeClusterSegmenter* self, const char* input_data, size_t input_len); + +ICU4XGraphemeClusterBreakIteratorUtf16* ICU4XGraphemeClusterSegmenter_segment_utf16(const ICU4XGraphemeClusterSegmenter* self, const uint16_t* input_data, size_t input_len); + +ICU4XGraphemeClusterBreakIteratorLatin1* ICU4XGraphemeClusterSegmenter_segment_latin1(const ICU4XGraphemeClusterSegmenter* self, const uint8_t* input_data, size_t input_len); +void ICU4XGraphemeClusterSegmenter_destroy(ICU4XGraphemeClusterSegmenter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XGregorianDateFormatter.h b/intl/icu_capi/c/include/ICU4XGregorianDateFormatter.h new file mode 100644 index 0000000000..cf3ad9e9f4 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XGregorianDateFormatter.h @@ -0,0 +1,40 @@ +#ifndef ICU4XGregorianDateFormatter_H +#define ICU4XGregorianDateFormatter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XGregorianDateFormatter ICU4XGregorianDateFormatter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "ICU4XDateLength.h" +#include "diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h" +#include "ICU4XIsoDate.h" +#include "diplomat_result_void_ICU4XError.h" +#include "ICU4XIsoDateTime.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError ICU4XGregorianDateFormatter_create_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength length); + +diplomat_result_void_ICU4XError ICU4XGregorianDateFormatter_format_iso_date(const ICU4XGregorianDateFormatter* self, const ICU4XIsoDate* value, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XGregorianDateFormatter_format_iso_datetime(const ICU4XGregorianDateFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write); +void ICU4XGregorianDateFormatter_destroy(ICU4XGregorianDateFormatter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XGregorianDateTimeFormatter.h b/intl/icu_capi/c/include/ICU4XGregorianDateTimeFormatter.h new file mode 100644 index 0000000000..0b56ddc393 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XGregorianDateTimeFormatter.h @@ -0,0 +1,38 @@ +#ifndef ICU4XGregorianDateTimeFormatter_H +#define ICU4XGregorianDateTimeFormatter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XGregorianDateTimeFormatter ICU4XGregorianDateTimeFormatter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "ICU4XDateLength.h" +#include "ICU4XTimeLength.h" +#include "diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h" +#include "ICU4XIsoDateTime.h" +#include "diplomat_result_void_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError ICU4XGregorianDateTimeFormatter_create_with_lengths(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length); + +diplomat_result_void_ICU4XError ICU4XGregorianDateTimeFormatter_format_iso_datetime(const ICU4XGregorianDateTimeFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write); +void ICU4XGregorianDateTimeFormatter_destroy(ICU4XGregorianDateTimeFormatter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XGregorianZonedDateTimeFormatter.h b/intl/icu_capi/c/include/ICU4XGregorianZonedDateTimeFormatter.h new file mode 100644 index 0000000000..4be60c2b0b --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XGregorianZonedDateTimeFormatter.h @@ -0,0 +1,42 @@ +#ifndef ICU4XGregorianZonedDateTimeFormatter_H +#define ICU4XGregorianZonedDateTimeFormatter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XGregorianZonedDateTimeFormatter ICU4XGregorianZonedDateTimeFormatter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "ICU4XDateLength.h" +#include "ICU4XTimeLength.h" +#include "diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h" +#include "ICU4XIsoTimeZoneOptions.h" +#include "ICU4XIsoDateTime.h" +#include "ICU4XCustomTimeZone.h" +#include "diplomat_result_void_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError ICU4XGregorianZonedDateTimeFormatter_create_with_lengths(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length); + +diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError ICU4XGregorianZonedDateTimeFormatter_create_with_lengths_and_iso_8601_time_zone_fallback(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length, ICU4XIsoTimeZoneOptions zone_options); + +diplomat_result_void_ICU4XError ICU4XGregorianZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(const ICU4XGregorianZonedDateTimeFormatter* self, const ICU4XIsoDateTime* datetime, const ICU4XCustomTimeZone* time_zone, DiplomatWriteable* write); +void ICU4XGregorianZonedDateTimeFormatter_destroy(ICU4XGregorianZonedDateTimeFormatter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XIanaToBcp47Mapper.h b/intl/icu_capi/c/include/ICU4XIanaToBcp47Mapper.h new file mode 100644 index 0000000000..e06433b6d0 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XIanaToBcp47Mapper.h @@ -0,0 +1,31 @@ +#ifndef ICU4XIanaToBcp47Mapper_H +#define ICU4XIanaToBcp47Mapper_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XIanaToBcp47Mapper ICU4XIanaToBcp47Mapper; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError ICU4XIanaToBcp47Mapper_create(const ICU4XDataProvider* provider); +void ICU4XIanaToBcp47Mapper_destroy(ICU4XIanaToBcp47Mapper* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XIsoDate.h b/intl/icu_capi/c/include/ICU4XIsoDate.h new file mode 100644 index 0000000000..d7a018244a --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XIsoDate.h @@ -0,0 +1,61 @@ +#ifndef ICU4XIsoDate_H +#define ICU4XIsoDate_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XIsoDate ICU4XIsoDate; +#ifdef __cplusplus +} // namespace capi +#endif +#include "diplomat_result_box_ICU4XIsoDate_ICU4XError.h" +#include "ICU4XCalendar.h" +#include "ICU4XDate.h" +#include "ICU4XIsoWeekday.h" +#include "ICU4XWeekCalculator.h" +#include "diplomat_result_ICU4XWeekOf_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XIsoDate_ICU4XError ICU4XIsoDate_create(int32_t year, uint8_t month, uint8_t day); + +ICU4XIsoDate* ICU4XIsoDate_create_for_unix_epoch(); + +ICU4XDate* ICU4XIsoDate_to_calendar(const ICU4XIsoDate* self, const ICU4XCalendar* calendar); + +ICU4XDate* ICU4XIsoDate_to_any(const ICU4XIsoDate* self); + +uint32_t ICU4XIsoDate_day_of_month(const ICU4XIsoDate* self); + +ICU4XIsoWeekday ICU4XIsoDate_day_of_week(const ICU4XIsoDate* self); + +uint32_t ICU4XIsoDate_week_of_month(const ICU4XIsoDate* self, ICU4XIsoWeekday first_weekday); + +diplomat_result_ICU4XWeekOf_ICU4XError ICU4XIsoDate_week_of_year(const ICU4XIsoDate* self, const ICU4XWeekCalculator* calculator); + +uint32_t ICU4XIsoDate_month(const ICU4XIsoDate* self); + +int32_t ICU4XIsoDate_year(const ICU4XIsoDate* self); + +bool ICU4XIsoDate_is_in_leap_year(const ICU4XIsoDate* self); + +uint8_t ICU4XIsoDate_months_in_year(const ICU4XIsoDate* self); + +uint8_t ICU4XIsoDate_days_in_month(const ICU4XIsoDate* self); + +uint16_t ICU4XIsoDate_days_in_year(const ICU4XIsoDate* self); +void ICU4XIsoDate_destroy(ICU4XIsoDate* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XIsoDateTime.h b/intl/icu_capi/c/include/ICU4XIsoDateTime.h new file mode 100644 index 0000000000..404cbfedc8 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XIsoDateTime.h @@ -0,0 +1,79 @@ +#ifndef ICU4XIsoDateTime_H +#define ICU4XIsoDateTime_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XIsoDateTime ICU4XIsoDateTime; +#ifdef __cplusplus +} // namespace capi +#endif +#include "diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h" +#include "ICU4XIsoDate.h" +#include "ICU4XTime.h" +#include "ICU4XDateTime.h" +#include "ICU4XCalendar.h" +#include "ICU4XIsoWeekday.h" +#include "ICU4XWeekCalculator.h" +#include "diplomat_result_ICU4XWeekOf_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XIsoDateTime_ICU4XError ICU4XIsoDateTime_create(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); + +ICU4XIsoDateTime* ICU4XIsoDateTime_crate_from_date_and_time(const ICU4XIsoDate* date, const ICU4XTime* time); + +ICU4XIsoDateTime* ICU4XIsoDateTime_create_from_minutes_since_local_unix_epoch(int32_t minutes); + +ICU4XIsoDate* ICU4XIsoDateTime_date(const ICU4XIsoDateTime* self); + +ICU4XTime* ICU4XIsoDateTime_time(const ICU4XIsoDateTime* self); + +ICU4XDateTime* ICU4XIsoDateTime_to_any(const ICU4XIsoDateTime* self); + +int32_t ICU4XIsoDateTime_minutes_since_local_unix_epoch(const ICU4XIsoDateTime* self); + +ICU4XDateTime* ICU4XIsoDateTime_to_calendar(const ICU4XIsoDateTime* self, const ICU4XCalendar* calendar); + +uint8_t ICU4XIsoDateTime_hour(const ICU4XIsoDateTime* self); + +uint8_t ICU4XIsoDateTime_minute(const ICU4XIsoDateTime* self); + +uint8_t ICU4XIsoDateTime_second(const ICU4XIsoDateTime* self); + +uint32_t ICU4XIsoDateTime_nanosecond(const ICU4XIsoDateTime* self); + +uint32_t ICU4XIsoDateTime_day_of_month(const ICU4XIsoDateTime* self); + +ICU4XIsoWeekday ICU4XIsoDateTime_day_of_week(const ICU4XIsoDateTime* self); + +uint32_t ICU4XIsoDateTime_week_of_month(const ICU4XIsoDateTime* self, ICU4XIsoWeekday first_weekday); + +diplomat_result_ICU4XWeekOf_ICU4XError ICU4XIsoDateTime_week_of_year(const ICU4XIsoDateTime* self, const ICU4XWeekCalculator* calculator); + +uint32_t ICU4XIsoDateTime_month(const ICU4XIsoDateTime* self); + +int32_t ICU4XIsoDateTime_year(const ICU4XIsoDateTime* self); + +bool ICU4XIsoDateTime_is_in_leap_year(const ICU4XIsoDateTime* self); + +uint8_t ICU4XIsoDateTime_months_in_year(const ICU4XIsoDateTime* self); + +uint8_t ICU4XIsoDateTime_days_in_month(const ICU4XIsoDateTime* self); + +uint16_t ICU4XIsoDateTime_days_in_year(const ICU4XIsoDateTime* self); +void ICU4XIsoDateTime_destroy(ICU4XIsoDateTime* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XIsoTimeZoneFormat.h b/intl/icu_capi/c/include/ICU4XIsoTimeZoneFormat.h new file mode 100644 index 0000000000..e48a1142f2 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XIsoTimeZoneFormat.h @@ -0,0 +1,33 @@ +#ifndef ICU4XIsoTimeZoneFormat_H +#define ICU4XIsoTimeZoneFormat_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XIsoTimeZoneFormat { + ICU4XIsoTimeZoneFormat_Basic = 0, + ICU4XIsoTimeZoneFormat_Extended = 1, + ICU4XIsoTimeZoneFormat_UtcBasic = 2, + ICU4XIsoTimeZoneFormat_UtcExtended = 3, +} ICU4XIsoTimeZoneFormat; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XIsoTimeZoneFormat_destroy(ICU4XIsoTimeZoneFormat* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XIsoTimeZoneMinuteDisplay.h b/intl/icu_capi/c/include/ICU4XIsoTimeZoneMinuteDisplay.h new file mode 100644 index 0000000000..edeee97019 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XIsoTimeZoneMinuteDisplay.h @@ -0,0 +1,31 @@ +#ifndef ICU4XIsoTimeZoneMinuteDisplay_H +#define ICU4XIsoTimeZoneMinuteDisplay_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XIsoTimeZoneMinuteDisplay { + ICU4XIsoTimeZoneMinuteDisplay_Required = 0, + ICU4XIsoTimeZoneMinuteDisplay_Optional = 1, +} ICU4XIsoTimeZoneMinuteDisplay; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XIsoTimeZoneMinuteDisplay_destroy(ICU4XIsoTimeZoneMinuteDisplay* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XIsoTimeZoneOptions.h b/intl/icu_capi/c/include/ICU4XIsoTimeZoneOptions.h new file mode 100644 index 0000000000..7ba051c3e6 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XIsoTimeZoneOptions.h @@ -0,0 +1,38 @@ +#ifndef ICU4XIsoTimeZoneOptions_H +#define ICU4XIsoTimeZoneOptions_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#include "ICU4XIsoTimeZoneFormat.h" +#include "ICU4XIsoTimeZoneMinuteDisplay.h" +#include "ICU4XIsoTimeZoneSecondDisplay.h" +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XIsoTimeZoneOptions { + ICU4XIsoTimeZoneFormat format; + ICU4XIsoTimeZoneMinuteDisplay minutes; + ICU4XIsoTimeZoneSecondDisplay seconds; +} ICU4XIsoTimeZoneOptions; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XIsoTimeZoneFormat.h" +#include "ICU4XIsoTimeZoneMinuteDisplay.h" +#include "ICU4XIsoTimeZoneSecondDisplay.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XIsoTimeZoneOptions_destroy(ICU4XIsoTimeZoneOptions* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XIsoTimeZoneSecondDisplay.h b/intl/icu_capi/c/include/ICU4XIsoTimeZoneSecondDisplay.h new file mode 100644 index 0000000000..487a248f95 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XIsoTimeZoneSecondDisplay.h @@ -0,0 +1,31 @@ +#ifndef ICU4XIsoTimeZoneSecondDisplay_H +#define ICU4XIsoTimeZoneSecondDisplay_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XIsoTimeZoneSecondDisplay { + ICU4XIsoTimeZoneSecondDisplay_Optional = 0, + ICU4XIsoTimeZoneSecondDisplay_Never = 1, +} ICU4XIsoTimeZoneSecondDisplay; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XIsoTimeZoneSecondDisplay_destroy(ICU4XIsoTimeZoneSecondDisplay* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XIsoWeekday.h b/intl/icu_capi/c/include/ICU4XIsoWeekday.h new file mode 100644 index 0000000000..a23d0a3b9e --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XIsoWeekday.h @@ -0,0 +1,36 @@ +#ifndef ICU4XIsoWeekday_H +#define ICU4XIsoWeekday_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XIsoWeekday { + ICU4XIsoWeekday_Monday = 1, + ICU4XIsoWeekday_Tuesday = 2, + ICU4XIsoWeekday_Wednesday = 3, + ICU4XIsoWeekday_Thursday = 4, + ICU4XIsoWeekday_Friday = 5, + ICU4XIsoWeekday_Saturday = 6, + ICU4XIsoWeekday_Sunday = 7, +} ICU4XIsoWeekday; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XIsoWeekday_destroy(ICU4XIsoWeekday* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLanguageDisplay.h b/intl/icu_capi/c/include/ICU4XLanguageDisplay.h new file mode 100644 index 0000000000..0b921351fe --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLanguageDisplay.h @@ -0,0 +1,31 @@ +#ifndef ICU4XLanguageDisplay_H +#define ICU4XLanguageDisplay_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XLanguageDisplay { + ICU4XLanguageDisplay_Dialect = 0, + ICU4XLanguageDisplay_Standard = 1, +} ICU4XLanguageDisplay; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XLanguageDisplay_destroy(ICU4XLanguageDisplay* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLeadingAdjustment.h b/intl/icu_capi/c/include/ICU4XLeadingAdjustment.h new file mode 100644 index 0000000000..91647188ed --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLeadingAdjustment.h @@ -0,0 +1,32 @@ +#ifndef ICU4XLeadingAdjustment_H +#define ICU4XLeadingAdjustment_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XLeadingAdjustment { + ICU4XLeadingAdjustment_Auto = 0, + ICU4XLeadingAdjustment_None = 1, + ICU4XLeadingAdjustment_ToCased = 2, +} ICU4XLeadingAdjustment; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XLeadingAdjustment_destroy(ICU4XLeadingAdjustment* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLineBreakIteratorLatin1.h b/intl/icu_capi/c/include/ICU4XLineBreakIteratorLatin1.h new file mode 100644 index 0000000000..c1a4c39131 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLineBreakIteratorLatin1.h @@ -0,0 +1,29 @@ +#ifndef ICU4XLineBreakIteratorLatin1_H +#define ICU4XLineBreakIteratorLatin1_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLineBreakIteratorLatin1 ICU4XLineBreakIteratorLatin1; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +int32_t ICU4XLineBreakIteratorLatin1_next(ICU4XLineBreakIteratorLatin1* self); +void ICU4XLineBreakIteratorLatin1_destroy(ICU4XLineBreakIteratorLatin1* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf16.h b/intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf16.h new file mode 100644 index 0000000000..78ae12c7e4 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf16.h @@ -0,0 +1,29 @@ +#ifndef ICU4XLineBreakIteratorUtf16_H +#define ICU4XLineBreakIteratorUtf16_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLineBreakIteratorUtf16 ICU4XLineBreakIteratorUtf16; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +int32_t ICU4XLineBreakIteratorUtf16_next(ICU4XLineBreakIteratorUtf16* self); +void ICU4XLineBreakIteratorUtf16_destroy(ICU4XLineBreakIteratorUtf16* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf8.h b/intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf8.h new file mode 100644 index 0000000000..3a08c5ad23 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLineBreakIteratorUtf8.h @@ -0,0 +1,29 @@ +#ifndef ICU4XLineBreakIteratorUtf8_H +#define ICU4XLineBreakIteratorUtf8_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLineBreakIteratorUtf8 ICU4XLineBreakIteratorUtf8; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +int32_t ICU4XLineBreakIteratorUtf8_next(ICU4XLineBreakIteratorUtf8* self); +void ICU4XLineBreakIteratorUtf8_destroy(ICU4XLineBreakIteratorUtf8* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLineBreakOptionsV1.h b/intl/icu_capi/c/include/ICU4XLineBreakOptionsV1.h new file mode 100644 index 0000000000..5fbf4b5814 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLineBreakOptionsV1.h @@ -0,0 +1,36 @@ +#ifndef ICU4XLineBreakOptionsV1_H +#define ICU4XLineBreakOptionsV1_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#include "ICU4XLineBreakStrictness.h" +#include "ICU4XLineBreakWordOption.h" +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLineBreakOptionsV1 { + ICU4XLineBreakStrictness strictness; + ICU4XLineBreakWordOption word_option; + bool ja_zh; +} ICU4XLineBreakOptionsV1; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XLineBreakStrictness.h" +#include "ICU4XLineBreakWordOption.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XLineBreakOptionsV1_destroy(ICU4XLineBreakOptionsV1* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLineBreakStrictness.h b/intl/icu_capi/c/include/ICU4XLineBreakStrictness.h new file mode 100644 index 0000000000..e3534b7ec7 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLineBreakStrictness.h @@ -0,0 +1,33 @@ +#ifndef ICU4XLineBreakStrictness_H +#define ICU4XLineBreakStrictness_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XLineBreakStrictness { + ICU4XLineBreakStrictness_Loose = 0, + ICU4XLineBreakStrictness_Normal = 1, + ICU4XLineBreakStrictness_Strict = 2, + ICU4XLineBreakStrictness_Anywhere = 3, +} ICU4XLineBreakStrictness; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XLineBreakStrictness_destroy(ICU4XLineBreakStrictness* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLineBreakWordOption.h b/intl/icu_capi/c/include/ICU4XLineBreakWordOption.h new file mode 100644 index 0000000000..02a6ca6f2d --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLineBreakWordOption.h @@ -0,0 +1,32 @@ +#ifndef ICU4XLineBreakWordOption_H +#define ICU4XLineBreakWordOption_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XLineBreakWordOption { + ICU4XLineBreakWordOption_Normal = 0, + ICU4XLineBreakWordOption_BreakAll = 1, + ICU4XLineBreakWordOption_KeepAll = 2, +} ICU4XLineBreakWordOption; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XLineBreakWordOption_destroy(ICU4XLineBreakWordOption* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLineSegmenter.h b/intl/icu_capi/c/include/ICU4XLineSegmenter.h new file mode 100644 index 0000000000..f734ec78f8 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLineSegmenter.h @@ -0,0 +1,51 @@ +#ifndef ICU4XLineSegmenter_H +#define ICU4XLineSegmenter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLineSegmenter ICU4XLineSegmenter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h" +#include "ICU4XLineBreakOptionsV1.h" +#include "ICU4XLineBreakIteratorUtf8.h" +#include "ICU4XLineBreakIteratorUtf16.h" +#include "ICU4XLineBreakIteratorLatin1.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_auto(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_lstm(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_dictionary(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_auto_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); + +diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_lstm_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); + +diplomat_result_box_ICU4XLineSegmenter_ICU4XError ICU4XLineSegmenter_create_dictionary_with_options_v1(const ICU4XDataProvider* provider, ICU4XLineBreakOptionsV1 options); + +ICU4XLineBreakIteratorUtf8* ICU4XLineSegmenter_segment_utf8(const ICU4XLineSegmenter* self, const char* input_data, size_t input_len); + +ICU4XLineBreakIteratorUtf16* ICU4XLineSegmenter_segment_utf16(const ICU4XLineSegmenter* self, const uint16_t* input_data, size_t input_len); + +ICU4XLineBreakIteratorLatin1* ICU4XLineSegmenter_segment_latin1(const ICU4XLineSegmenter* self, const uint8_t* input_data, size_t input_len); +void ICU4XLineSegmenter_destroy(ICU4XLineSegmenter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XList.h b/intl/icu_capi/c/include/ICU4XList.h new file mode 100644 index 0000000000..6549561c37 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XList.h @@ -0,0 +1,35 @@ +#ifndef ICU4XList_H +#define ICU4XList_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XList ICU4XList; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +ICU4XList* ICU4XList_create(); + +ICU4XList* ICU4XList_create_with_capacity(size_t capacity); + +void ICU4XList_push(ICU4XList* self, const char* val_data, size_t val_len); + +size_t ICU4XList_len(const ICU4XList* self); +void ICU4XList_destroy(ICU4XList* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XListFormatter.h b/intl/icu_capi/c/include/ICU4XListFormatter.h new file mode 100644 index 0000000000..ee358dc254 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XListFormatter.h @@ -0,0 +1,41 @@ +#ifndef ICU4XListFormatter_H +#define ICU4XListFormatter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XListFormatter ICU4XListFormatter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "ICU4XListLength.h" +#include "diplomat_result_box_ICU4XListFormatter_ICU4XError.h" +#include "ICU4XList.h" +#include "diplomat_result_void_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_and_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); + +diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_or_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); + +diplomat_result_box_ICU4XListFormatter_ICU4XError ICU4XListFormatter_create_unit_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XListLength length); + +diplomat_result_void_ICU4XError ICU4XListFormatter_format(const ICU4XListFormatter* self, const ICU4XList* list, DiplomatWriteable* write); +void ICU4XListFormatter_destroy(ICU4XListFormatter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XListLength.h b/intl/icu_capi/c/include/ICU4XListLength.h new file mode 100644 index 0000000000..7092f6d9df --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XListLength.h @@ -0,0 +1,32 @@ +#ifndef ICU4XListLength_H +#define ICU4XListLength_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XListLength { + ICU4XListLength_Wide = 0, + ICU4XListLength_Short = 1, + ICU4XListLength_Narrow = 2, +} ICU4XListLength; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XListLength_destroy(ICU4XListLength* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLocale.h b/intl/icu_capi/c/include/ICU4XLocale.h new file mode 100644 index 0000000000..dea8d196b5 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLocale.h @@ -0,0 +1,64 @@ +#ifndef ICU4XLocale_H +#define ICU4XLocale_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLocale ICU4XLocale; +#ifdef __cplusplus +} // namespace capi +#endif +#include "diplomat_result_box_ICU4XLocale_ICU4XError.h" +#include "diplomat_result_void_ICU4XError.h" +#include "ICU4XOrdering.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XLocale_ICU4XError ICU4XLocale_create_from_string(const char* name_data, size_t name_len); + +ICU4XLocale* ICU4XLocale_create_und(); + +ICU4XLocale* ICU4XLocale_clone(const ICU4XLocale* self); + +diplomat_result_void_ICU4XError ICU4XLocale_basename(const ICU4XLocale* self, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XLocale_get_unicode_extension(const ICU4XLocale* self, const char* bytes_data, size_t bytes_len, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XLocale_language(const ICU4XLocale* self, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XLocale_set_language(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); + +diplomat_result_void_ICU4XError ICU4XLocale_region(const ICU4XLocale* self, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XLocale_set_region(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); + +diplomat_result_void_ICU4XError ICU4XLocale_script(const ICU4XLocale* self, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XLocale_set_script(ICU4XLocale* self, const char* bytes_data, size_t bytes_len); + +diplomat_result_void_ICU4XError ICU4XLocale_canonicalize(const char* bytes_data, size_t bytes_len, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XLocale_to_string(const ICU4XLocale* self, DiplomatWriteable* write); + +bool ICU4XLocale_normalizing_eq(const ICU4XLocale* self, const char* other_data, size_t other_len); + +ICU4XOrdering ICU4XLocale_strict_cmp(const ICU4XLocale* self, const char* other_data, size_t other_len); + +ICU4XLocale* ICU4XLocale_create_en(); + +ICU4XLocale* ICU4XLocale_create_bn(); +void ICU4XLocale_destroy(ICU4XLocale* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLocaleCanonicalizer.h b/intl/icu_capi/c/include/ICU4XLocaleCanonicalizer.h new file mode 100644 index 0000000000..8b48ad8bb6 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLocaleCanonicalizer.h @@ -0,0 +1,37 @@ +#ifndef ICU4XLocaleCanonicalizer_H +#define ICU4XLocaleCanonicalizer_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLocaleCanonicalizer ICU4XLocaleCanonicalizer; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h" +#include "ICU4XLocale.h" +#include "ICU4XTransformResult.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError ICU4XLocaleCanonicalizer_create(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError ICU4XLocaleCanonicalizer_create_extended(const ICU4XDataProvider* provider); + +ICU4XTransformResult ICU4XLocaleCanonicalizer_canonicalize(const ICU4XLocaleCanonicalizer* self, ICU4XLocale* locale); +void ICU4XLocaleCanonicalizer_destroy(ICU4XLocaleCanonicalizer* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLocaleDirection.h b/intl/icu_capi/c/include/ICU4XLocaleDirection.h new file mode 100644 index 0000000000..688f04c98c --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLocaleDirection.h @@ -0,0 +1,32 @@ +#ifndef ICU4XLocaleDirection_H +#define ICU4XLocaleDirection_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XLocaleDirection { + ICU4XLocaleDirection_LeftToRight = 0, + ICU4XLocaleDirection_RightToLeft = 1, + ICU4XLocaleDirection_Unknown = 2, +} ICU4XLocaleDirection; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XLocaleDirection_destroy(ICU4XLocaleDirection* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLocaleDirectionality.h b/intl/icu_capi/c/include/ICU4XLocaleDirectionality.h new file mode 100644 index 0000000000..9271b078c7 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLocaleDirectionality.h @@ -0,0 +1,42 @@ +#ifndef ICU4XLocaleDirectionality_H +#define ICU4XLocaleDirectionality_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLocaleDirectionality ICU4XLocaleDirectionality; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h" +#include "ICU4XLocaleExpander.h" +#include "ICU4XLocale.h" +#include "ICU4XLocaleDirection.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError ICU4XLocaleDirectionality_create(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError ICU4XLocaleDirectionality_create_with_expander(const ICU4XDataProvider* provider, const ICU4XLocaleExpander* expander); + +ICU4XLocaleDirection ICU4XLocaleDirectionality_get(const ICU4XLocaleDirectionality* self, const ICU4XLocale* locale); + +bool ICU4XLocaleDirectionality_is_left_to_right(const ICU4XLocaleDirectionality* self, const ICU4XLocale* locale); + +bool ICU4XLocaleDirectionality_is_right_to_left(const ICU4XLocaleDirectionality* self, const ICU4XLocale* locale); +void ICU4XLocaleDirectionality_destroy(ICU4XLocaleDirectionality* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLocaleDisplayNamesFormatter.h b/intl/icu_capi/c/include/ICU4XLocaleDisplayNamesFormatter.h new file mode 100644 index 0000000000..bfed8ec411 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLocaleDisplayNamesFormatter.h @@ -0,0 +1,36 @@ +#ifndef ICU4XLocaleDisplayNamesFormatter_H +#define ICU4XLocaleDisplayNamesFormatter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLocaleDisplayNamesFormatter ICU4XLocaleDisplayNamesFormatter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "ICU4XDisplayNamesOptionsV1.h" +#include "diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h" +#include "diplomat_result_void_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError ICU4XLocaleDisplayNamesFormatter_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDisplayNamesOptionsV1 options); + +diplomat_result_void_ICU4XError ICU4XLocaleDisplayNamesFormatter_of(const ICU4XLocaleDisplayNamesFormatter* self, const ICU4XLocale* locale, DiplomatWriteable* write); +void ICU4XLocaleDisplayNamesFormatter_destroy(ICU4XLocaleDisplayNamesFormatter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLocaleExpander.h b/intl/icu_capi/c/include/ICU4XLocaleExpander.h new file mode 100644 index 0000000000..a7de7be16b --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLocaleExpander.h @@ -0,0 +1,39 @@ +#ifndef ICU4XLocaleExpander_H +#define ICU4XLocaleExpander_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLocaleExpander ICU4XLocaleExpander; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h" +#include "ICU4XLocale.h" +#include "ICU4XTransformResult.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XLocaleExpander_ICU4XError ICU4XLocaleExpander_create(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XLocaleExpander_ICU4XError ICU4XLocaleExpander_create_extended(const ICU4XDataProvider* provider); + +ICU4XTransformResult ICU4XLocaleExpander_maximize(const ICU4XLocaleExpander* self, ICU4XLocale* locale); + +ICU4XTransformResult ICU4XLocaleExpander_minimize(const ICU4XLocaleExpander* self, ICU4XLocale* locale); +void ICU4XLocaleExpander_destroy(ICU4XLocaleExpander* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLocaleFallbackConfig.h b/intl/icu_capi/c/include/ICU4XLocaleFallbackConfig.h new file mode 100644 index 0000000000..b40d115418 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLocaleFallbackConfig.h @@ -0,0 +1,36 @@ +#ifndef ICU4XLocaleFallbackConfig_H +#define ICU4XLocaleFallbackConfig_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#include "ICU4XLocaleFallbackPriority.h" +#include "ICU4XLocaleFallbackSupplement.h" +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLocaleFallbackConfig { + ICU4XLocaleFallbackPriority priority; + DiplomatStringView extension_key; + ICU4XLocaleFallbackSupplement fallback_supplement; +} ICU4XLocaleFallbackConfig; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XLocaleFallbackPriority.h" +#include "ICU4XLocaleFallbackSupplement.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XLocaleFallbackConfig_destroy(ICU4XLocaleFallbackConfig* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLocaleFallbackIterator.h b/intl/icu_capi/c/include/ICU4XLocaleFallbackIterator.h new file mode 100644 index 0000000000..e2dd7a1a3b --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLocaleFallbackIterator.h @@ -0,0 +1,32 @@ +#ifndef ICU4XLocaleFallbackIterator_H +#define ICU4XLocaleFallbackIterator_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLocaleFallbackIterator ICU4XLocaleFallbackIterator; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XLocale.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +ICU4XLocale* ICU4XLocaleFallbackIterator_get(const ICU4XLocaleFallbackIterator* self); + +void ICU4XLocaleFallbackIterator_step(ICU4XLocaleFallbackIterator* self); +void ICU4XLocaleFallbackIterator_destroy(ICU4XLocaleFallbackIterator* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLocaleFallbackPriority.h b/intl/icu_capi/c/include/ICU4XLocaleFallbackPriority.h new file mode 100644 index 0000000000..e4ab748065 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLocaleFallbackPriority.h @@ -0,0 +1,32 @@ +#ifndef ICU4XLocaleFallbackPriority_H +#define ICU4XLocaleFallbackPriority_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XLocaleFallbackPriority { + ICU4XLocaleFallbackPriority_Language = 0, + ICU4XLocaleFallbackPriority_Region = 1, + ICU4XLocaleFallbackPriority_Collation = 2, +} ICU4XLocaleFallbackPriority; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XLocaleFallbackPriority_destroy(ICU4XLocaleFallbackPriority* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLocaleFallbackSupplement.h b/intl/icu_capi/c/include/ICU4XLocaleFallbackSupplement.h new file mode 100644 index 0000000000..952483c724 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLocaleFallbackSupplement.h @@ -0,0 +1,31 @@ +#ifndef ICU4XLocaleFallbackSupplement_H +#define ICU4XLocaleFallbackSupplement_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XLocaleFallbackSupplement { + ICU4XLocaleFallbackSupplement_None = 0, + ICU4XLocaleFallbackSupplement_Collation = 1, +} ICU4XLocaleFallbackSupplement; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XLocaleFallbackSupplement_destroy(ICU4XLocaleFallbackSupplement* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLocaleFallbacker.h b/intl/icu_capi/c/include/ICU4XLocaleFallbacker.h new file mode 100644 index 0000000000..24efb0602f --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLocaleFallbacker.h @@ -0,0 +1,37 @@ +#ifndef ICU4XLocaleFallbacker_H +#define ICU4XLocaleFallbacker_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLocaleFallbacker ICU4XLocaleFallbacker; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h" +#include "ICU4XLocaleFallbackConfig.h" +#include "diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError ICU4XLocaleFallbacker_create(const ICU4XDataProvider* provider); + +ICU4XLocaleFallbacker* ICU4XLocaleFallbacker_create_without_data(); + +diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError ICU4XLocaleFallbacker_for_config(const ICU4XLocaleFallbacker* self, ICU4XLocaleFallbackConfig config); +void ICU4XLocaleFallbacker_destroy(ICU4XLocaleFallbacker* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLocaleFallbackerWithConfig.h b/intl/icu_capi/c/include/ICU4XLocaleFallbackerWithConfig.h new file mode 100644 index 0000000000..e8baa9563e --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLocaleFallbackerWithConfig.h @@ -0,0 +1,31 @@ +#ifndef ICU4XLocaleFallbackerWithConfig_H +#define ICU4XLocaleFallbackerWithConfig_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLocaleFallbackerWithConfig ICU4XLocaleFallbackerWithConfig; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XLocale.h" +#include "ICU4XLocaleFallbackIterator.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +ICU4XLocaleFallbackIterator* ICU4XLocaleFallbackerWithConfig_fallback_for_locale(const ICU4XLocaleFallbackerWithConfig* self, const ICU4XLocale* locale); +void ICU4XLocaleFallbackerWithConfig_destroy(ICU4XLocaleFallbackerWithConfig* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XLogger.h b/intl/icu_capi/c/include/ICU4XLogger.h new file mode 100644 index 0000000000..0aa1d0b1f9 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XLogger.h @@ -0,0 +1,31 @@ +#ifndef ICU4XLogger_H +#define ICU4XLogger_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XLogger ICU4XLogger; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +bool ICU4XLogger_init_simple_logger(); + +bool ICU4XLogger_init_console_logger(); +void ICU4XLogger_destroy(ICU4XLogger* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XMetazoneCalculator.h b/intl/icu_capi/c/include/ICU4XMetazoneCalculator.h new file mode 100644 index 0000000000..9c66754e90 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XMetazoneCalculator.h @@ -0,0 +1,31 @@ +#ifndef ICU4XMetazoneCalculator_H +#define ICU4XMetazoneCalculator_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XMetazoneCalculator ICU4XMetazoneCalculator; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError ICU4XMetazoneCalculator_create(const ICU4XDataProvider* provider); +void ICU4XMetazoneCalculator_destroy(ICU4XMetazoneCalculator* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XOrdering.h b/intl/icu_capi/c/include/ICU4XOrdering.h new file mode 100644 index 0000000000..2c1885f43e --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XOrdering.h @@ -0,0 +1,32 @@ +#ifndef ICU4XOrdering_H +#define ICU4XOrdering_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XOrdering { + ICU4XOrdering_Less = -1, + ICU4XOrdering_Equal = 0, + ICU4XOrdering_Greater = 1, +} ICU4XOrdering; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XOrdering_destroy(ICU4XOrdering* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XPluralCategories.h b/intl/icu_capi/c/include/ICU4XPluralCategories.h new file mode 100644 index 0000000000..931ea2daa7 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XPluralCategories.h @@ -0,0 +1,35 @@ +#ifndef ICU4XPluralCategories_H +#define ICU4XPluralCategories_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XPluralCategories { + bool zero; + bool one; + bool two; + bool few; + bool many; + bool other; +} ICU4XPluralCategories; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XPluralCategories_destroy(ICU4XPluralCategories* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XPluralCategory.h b/intl/icu_capi/c/include/ICU4XPluralCategory.h new file mode 100644 index 0000000000..543681c746 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XPluralCategory.h @@ -0,0 +1,37 @@ +#ifndef ICU4XPluralCategory_H +#define ICU4XPluralCategory_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XPluralCategory { + ICU4XPluralCategory_Zero = 0, + ICU4XPluralCategory_One = 1, + ICU4XPluralCategory_Two = 2, + ICU4XPluralCategory_Few = 3, + ICU4XPluralCategory_Many = 4, + ICU4XPluralCategory_Other = 5, +} ICU4XPluralCategory; +#ifdef __cplusplus +} // namespace capi +#endif +#include "diplomat_result_ICU4XPluralCategory_void.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_ICU4XPluralCategory_void ICU4XPluralCategory_get_for_cldr_string(const char* s_data, size_t s_len); +void ICU4XPluralCategory_destroy(ICU4XPluralCategory* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XPluralOperands.h b/intl/icu_capi/c/include/ICU4XPluralOperands.h new file mode 100644 index 0000000000..14d997555f --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XPluralOperands.h @@ -0,0 +1,30 @@ +#ifndef ICU4XPluralOperands_H +#define ICU4XPluralOperands_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XPluralOperands ICU4XPluralOperands; +#ifdef __cplusplus +} // namespace capi +#endif +#include "diplomat_result_box_ICU4XPluralOperands_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XPluralOperands_ICU4XError ICU4XPluralOperands_create_from_string(const char* s_data, size_t s_len); +void ICU4XPluralOperands_destroy(ICU4XPluralOperands* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XPluralRules.h b/intl/icu_capi/c/include/ICU4XPluralRules.h new file mode 100644 index 0000000000..0794a7ac8e --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XPluralRules.h @@ -0,0 +1,41 @@ +#ifndef ICU4XPluralRules_H +#define ICU4XPluralRules_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XPluralRules ICU4XPluralRules; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "diplomat_result_box_ICU4XPluralRules_ICU4XError.h" +#include "ICU4XPluralOperands.h" +#include "ICU4XPluralCategory.h" +#include "ICU4XPluralCategories.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XPluralRules_ICU4XError ICU4XPluralRules_create_cardinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale); + +diplomat_result_box_ICU4XPluralRules_ICU4XError ICU4XPluralRules_create_ordinal(const ICU4XDataProvider* provider, const ICU4XLocale* locale); + +ICU4XPluralCategory ICU4XPluralRules_category_for(const ICU4XPluralRules* self, const ICU4XPluralOperands* op); + +ICU4XPluralCategories ICU4XPluralRules_categories(const ICU4XPluralRules* self); +void ICU4XPluralRules_destroy(ICU4XPluralRules* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XPropertyValueNameToEnumMapper.h b/intl/icu_capi/c/include/ICU4XPropertyValueNameToEnumMapper.h new file mode 100644 index 0000000000..54000ce338 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XPropertyValueNameToEnumMapper.h @@ -0,0 +1,51 @@ +#ifndef ICU4XPropertyValueNameToEnumMapper_H +#define ICU4XPropertyValueNameToEnumMapper_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XPropertyValueNameToEnumMapper ICU4XPropertyValueNameToEnumMapper; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +int16_t ICU4XPropertyValueNameToEnumMapper_get_strict(const ICU4XPropertyValueNameToEnumMapper* self, const char* name_data, size_t name_len); + +int16_t ICU4XPropertyValueNameToEnumMapper_get_loose(const ICU4XPropertyValueNameToEnumMapper* self, const char* name_data, size_t name_len); + +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_general_category(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_bidi_class(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_east_asian_width(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_indic_syllabic_category(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_line_break(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_grapheme_cluster_break(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_word_break(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_sentence_break(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError ICU4XPropertyValueNameToEnumMapper_load_script(const ICU4XDataProvider* provider); +void ICU4XPropertyValueNameToEnumMapper_destroy(ICU4XPropertyValueNameToEnumMapper* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XRegionDisplayNames.h b/intl/icu_capi/c/include/ICU4XRegionDisplayNames.h new file mode 100644 index 0000000000..a78ec64865 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XRegionDisplayNames.h @@ -0,0 +1,35 @@ +#ifndef ICU4XRegionDisplayNames_H +#define ICU4XRegionDisplayNames_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XRegionDisplayNames ICU4XRegionDisplayNames; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h" +#include "diplomat_result_void_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError ICU4XRegionDisplayNames_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale); + +diplomat_result_void_ICU4XError ICU4XRegionDisplayNames_of(const ICU4XRegionDisplayNames* self, const char* region_data, size_t region_len, DiplomatWriteable* write); +void ICU4XRegionDisplayNames_destroy(ICU4XRegionDisplayNames* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XReorderedIndexMap.h b/intl/icu_capi/c/include/ICU4XReorderedIndexMap.h new file mode 100644 index 0000000000..f5507a7217 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XReorderedIndexMap.h @@ -0,0 +1,33 @@ +#ifndef ICU4XReorderedIndexMap_H +#define ICU4XReorderedIndexMap_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XReorderedIndexMap ICU4XReorderedIndexMap; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +DiplomatUsizeView ICU4XReorderedIndexMap_as_slice(const ICU4XReorderedIndexMap* self); + +size_t ICU4XReorderedIndexMap_len(const ICU4XReorderedIndexMap* self); + +size_t ICU4XReorderedIndexMap_get(const ICU4XReorderedIndexMap* self, size_t index); +void ICU4XReorderedIndexMap_destroy(ICU4XReorderedIndexMap* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XRoundingIncrement.h b/intl/icu_capi/c/include/ICU4XRoundingIncrement.h new file mode 100644 index 0000000000..c4b0666bef --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XRoundingIncrement.h @@ -0,0 +1,33 @@ +#ifndef ICU4XRoundingIncrement_H +#define ICU4XRoundingIncrement_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XRoundingIncrement { + ICU4XRoundingIncrement_MultiplesOf1 = 0, + ICU4XRoundingIncrement_MultiplesOf2 = 1, + ICU4XRoundingIncrement_MultiplesOf5 = 2, + ICU4XRoundingIncrement_MultiplesOf25 = 3, +} ICU4XRoundingIncrement; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XRoundingIncrement_destroy(ICU4XRoundingIncrement* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XScriptExtensionsSet.h b/intl/icu_capi/c/include/ICU4XScriptExtensionsSet.h new file mode 100644 index 0000000000..b4982dc22c --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XScriptExtensionsSet.h @@ -0,0 +1,34 @@ +#ifndef ICU4XScriptExtensionsSet_H +#define ICU4XScriptExtensionsSet_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XScriptExtensionsSet ICU4XScriptExtensionsSet; +#ifdef __cplusplus +} // namespace capi +#endif +#include "diplomat_result_uint16_t_void.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +bool ICU4XScriptExtensionsSet_contains(const ICU4XScriptExtensionsSet* self, uint16_t script); + +size_t ICU4XScriptExtensionsSet_count(const ICU4XScriptExtensionsSet* self); + +diplomat_result_uint16_t_void ICU4XScriptExtensionsSet_script_at(const ICU4XScriptExtensionsSet* self, size_t index); +void ICU4XScriptExtensionsSet_destroy(ICU4XScriptExtensionsSet* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XScriptWithExtensions.h b/intl/icu_capi/c/include/ICU4XScriptWithExtensions.h new file mode 100644 index 0000000000..df2dd53946 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XScriptWithExtensions.h @@ -0,0 +1,41 @@ +#ifndef ICU4XScriptWithExtensions_H +#define ICU4XScriptWithExtensions_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XScriptWithExtensions ICU4XScriptWithExtensions; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h" +#include "ICU4XScriptWithExtensionsBorrowed.h" +#include "CodePointRangeIterator.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError ICU4XScriptWithExtensions_create(const ICU4XDataProvider* provider); + +uint16_t ICU4XScriptWithExtensions_get_script_val(const ICU4XScriptWithExtensions* self, uint32_t code_point); + +bool ICU4XScriptWithExtensions_has_script(const ICU4XScriptWithExtensions* self, uint32_t code_point, uint16_t script); + +ICU4XScriptWithExtensionsBorrowed* ICU4XScriptWithExtensions_as_borrowed(const ICU4XScriptWithExtensions* self); + +CodePointRangeIterator* ICU4XScriptWithExtensions_iter_ranges_for_script(const ICU4XScriptWithExtensions* self, uint16_t script); +void ICU4XScriptWithExtensions_destroy(ICU4XScriptWithExtensions* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XScriptWithExtensionsBorrowed.h b/intl/icu_capi/c/include/ICU4XScriptWithExtensionsBorrowed.h new file mode 100644 index 0000000000..82faeec178 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XScriptWithExtensionsBorrowed.h @@ -0,0 +1,37 @@ +#ifndef ICU4XScriptWithExtensionsBorrowed_H +#define ICU4XScriptWithExtensionsBorrowed_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XScriptWithExtensionsBorrowed ICU4XScriptWithExtensionsBorrowed; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XScriptExtensionsSet.h" +#include "ICU4XCodePointSetData.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +uint16_t ICU4XScriptWithExtensionsBorrowed_get_script_val(const ICU4XScriptWithExtensionsBorrowed* self, uint32_t code_point); + +ICU4XScriptExtensionsSet* ICU4XScriptWithExtensionsBorrowed_get_script_extensions_val(const ICU4XScriptWithExtensionsBorrowed* self, uint32_t code_point); + +bool ICU4XScriptWithExtensionsBorrowed_has_script(const ICU4XScriptWithExtensionsBorrowed* self, uint32_t code_point, uint16_t script); + +ICU4XCodePointSetData* ICU4XScriptWithExtensionsBorrowed_get_script_extensions_set(const ICU4XScriptWithExtensionsBorrowed* self, uint16_t script); +void ICU4XScriptWithExtensionsBorrowed_destroy(ICU4XScriptWithExtensionsBorrowed* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XSegmenterWordType.h b/intl/icu_capi/c/include/ICU4XSegmenterWordType.h new file mode 100644 index 0000000000..9f4f81cf10 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XSegmenterWordType.h @@ -0,0 +1,32 @@ +#ifndef ICU4XSegmenterWordType_H +#define ICU4XSegmenterWordType_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XSegmenterWordType { + ICU4XSegmenterWordType_None = 0, + ICU4XSegmenterWordType_Number = 1, + ICU4XSegmenterWordType_Letter = 2, +} ICU4XSegmenterWordType; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XSegmenterWordType_destroy(ICU4XSegmenterWordType* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorLatin1.h b/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorLatin1.h new file mode 100644 index 0000000000..6dd7b132dc --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorLatin1.h @@ -0,0 +1,29 @@ +#ifndef ICU4XSentenceBreakIteratorLatin1_H +#define ICU4XSentenceBreakIteratorLatin1_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XSentenceBreakIteratorLatin1 ICU4XSentenceBreakIteratorLatin1; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +int32_t ICU4XSentenceBreakIteratorLatin1_next(ICU4XSentenceBreakIteratorLatin1* self); +void ICU4XSentenceBreakIteratorLatin1_destroy(ICU4XSentenceBreakIteratorLatin1* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf16.h b/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf16.h new file mode 100644 index 0000000000..3ed0dc18c3 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf16.h @@ -0,0 +1,29 @@ +#ifndef ICU4XSentenceBreakIteratorUtf16_H +#define ICU4XSentenceBreakIteratorUtf16_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XSentenceBreakIteratorUtf16 ICU4XSentenceBreakIteratorUtf16; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +int32_t ICU4XSentenceBreakIteratorUtf16_next(ICU4XSentenceBreakIteratorUtf16* self); +void ICU4XSentenceBreakIteratorUtf16_destroy(ICU4XSentenceBreakIteratorUtf16* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf8.h b/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf8.h new file mode 100644 index 0000000000..655cb67b6c --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XSentenceBreakIteratorUtf8.h @@ -0,0 +1,29 @@ +#ifndef ICU4XSentenceBreakIteratorUtf8_H +#define ICU4XSentenceBreakIteratorUtf8_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XSentenceBreakIteratorUtf8 ICU4XSentenceBreakIteratorUtf8; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +int32_t ICU4XSentenceBreakIteratorUtf8_next(ICU4XSentenceBreakIteratorUtf8* self); +void ICU4XSentenceBreakIteratorUtf8_destroy(ICU4XSentenceBreakIteratorUtf8* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XSentenceSegmenter.h b/intl/icu_capi/c/include/ICU4XSentenceSegmenter.h new file mode 100644 index 0000000000..7701c9f042 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XSentenceSegmenter.h @@ -0,0 +1,40 @@ +#ifndef ICU4XSentenceSegmenter_H +#define ICU4XSentenceSegmenter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XSentenceSegmenter ICU4XSentenceSegmenter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h" +#include "ICU4XSentenceBreakIteratorUtf8.h" +#include "ICU4XSentenceBreakIteratorUtf16.h" +#include "ICU4XSentenceBreakIteratorLatin1.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError ICU4XSentenceSegmenter_create(const ICU4XDataProvider* provider); + +ICU4XSentenceBreakIteratorUtf8* ICU4XSentenceSegmenter_segment_utf8(const ICU4XSentenceSegmenter* self, const char* input_data, size_t input_len); + +ICU4XSentenceBreakIteratorUtf16* ICU4XSentenceSegmenter_segment_utf16(const ICU4XSentenceSegmenter* self, const uint16_t* input_data, size_t input_len); + +ICU4XSentenceBreakIteratorLatin1* ICU4XSentenceSegmenter_segment_latin1(const ICU4XSentenceSegmenter* self, const uint8_t* input_data, size_t input_len); +void ICU4XSentenceSegmenter_destroy(ICU4XSentenceSegmenter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XTime.h b/intl/icu_capi/c/include/ICU4XTime.h new file mode 100644 index 0000000000..2f3a9967fa --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XTime.h @@ -0,0 +1,40 @@ +#ifndef ICU4XTime_H +#define ICU4XTime_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XTime ICU4XTime; +#ifdef __cplusplus +} // namespace capi +#endif +#include "diplomat_result_box_ICU4XTime_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XTime_ICU4XError ICU4XTime_create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond); + +diplomat_result_box_ICU4XTime_ICU4XError ICU4XTime_create_midnight(); + +uint8_t ICU4XTime_hour(const ICU4XTime* self); + +uint8_t ICU4XTime_minute(const ICU4XTime* self); + +uint8_t ICU4XTime_second(const ICU4XTime* self); + +uint32_t ICU4XTime_nanosecond(const ICU4XTime* self); +void ICU4XTime_destroy(ICU4XTime* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XTimeFormatter.h b/intl/icu_capi/c/include/ICU4XTimeFormatter.h new file mode 100644 index 0000000000..d200881399 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XTimeFormatter.h @@ -0,0 +1,43 @@ +#ifndef ICU4XTimeFormatter_H +#define ICU4XTimeFormatter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XTimeFormatter ICU4XTimeFormatter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "ICU4XTimeLength.h" +#include "diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h" +#include "ICU4XTime.h" +#include "diplomat_result_void_ICU4XError.h" +#include "ICU4XDateTime.h" +#include "ICU4XIsoDateTime.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XTimeFormatter_ICU4XError ICU4XTimeFormatter_create_with_length(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XTimeLength length); + +diplomat_result_void_ICU4XError ICU4XTimeFormatter_format_time(const ICU4XTimeFormatter* self, const ICU4XTime* value, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XTimeFormatter_format_datetime(const ICU4XTimeFormatter* self, const ICU4XDateTime* value, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XTimeFormatter_format_iso_datetime(const ICU4XTimeFormatter* self, const ICU4XIsoDateTime* value, DiplomatWriteable* write); +void ICU4XTimeFormatter_destroy(ICU4XTimeFormatter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XTimeLength.h b/intl/icu_capi/c/include/ICU4XTimeLength.h new file mode 100644 index 0000000000..6d98bc8ccb --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XTimeLength.h @@ -0,0 +1,33 @@ +#ifndef ICU4XTimeLength_H +#define ICU4XTimeLength_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XTimeLength { + ICU4XTimeLength_Full = 0, + ICU4XTimeLength_Long = 1, + ICU4XTimeLength_Medium = 2, + ICU4XTimeLength_Short = 3, +} ICU4XTimeLength; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XTimeLength_destroy(ICU4XTimeLength* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XTimeZoneFormatter.h b/intl/icu_capi/c/include/ICU4XTimeZoneFormatter.h new file mode 100644 index 0000000000..5eb1299543 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XTimeZoneFormatter.h @@ -0,0 +1,53 @@ +#ifndef ICU4XTimeZoneFormatter_H +#define ICU4XTimeZoneFormatter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XTimeZoneFormatter ICU4XTimeZoneFormatter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h" +#include "ICU4XIsoTimeZoneOptions.h" +#include "diplomat_result_void_ICU4XError.h" +#include "ICU4XCustomTimeZone.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError ICU4XTimeZoneFormatter_create_with_localized_gmt_fallback(const ICU4XDataProvider* provider, const ICU4XLocale* locale); + +diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError ICU4XTimeZoneFormatter_create_with_iso_8601_fallback(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XIsoTimeZoneOptions options); + +diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_generic_non_location_long(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider); + +diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_generic_non_location_short(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider); + +diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_specific_non_location_long(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider); + +diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_specific_non_location_short(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider); + +diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_generic_location_format(ICU4XTimeZoneFormatter* self, const ICU4XDataProvider* provider); + +diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_include_localized_gmt_format(ICU4XTimeZoneFormatter* self); + +diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_load_iso_8601_format(ICU4XTimeZoneFormatter* self, ICU4XIsoTimeZoneOptions options); + +diplomat_result_void_ICU4XError ICU4XTimeZoneFormatter_format_custom_time_zone(const ICU4XTimeZoneFormatter* self, const ICU4XCustomTimeZone* value, DiplomatWriteable* write); +void ICU4XTimeZoneFormatter_destroy(ICU4XTimeZoneFormatter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XTitlecaseMapper.h b/intl/icu_capi/c/include/ICU4XTitlecaseMapper.h new file mode 100644 index 0000000000..04debefbf9 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XTitlecaseMapper.h @@ -0,0 +1,36 @@ +#ifndef ICU4XTitlecaseMapper_H +#define ICU4XTitlecaseMapper_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XTitlecaseMapper ICU4XTitlecaseMapper; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h" +#include "ICU4XLocale.h" +#include "ICU4XTitlecaseOptionsV1.h" +#include "diplomat_result_void_ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError ICU4XTitlecaseMapper_create(const ICU4XDataProvider* provider); + +diplomat_result_void_ICU4XError ICU4XTitlecaseMapper_titlecase_segment_v1(const ICU4XTitlecaseMapper* self, const char* s_data, size_t s_len, const ICU4XLocale* locale, ICU4XTitlecaseOptionsV1 options, DiplomatWriteable* write); +void ICU4XTitlecaseMapper_destroy(ICU4XTitlecaseMapper* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XTitlecaseOptionsV1.h b/intl/icu_capi/c/include/ICU4XTitlecaseOptionsV1.h new file mode 100644 index 0000000000..a828188560 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XTitlecaseOptionsV1.h @@ -0,0 +1,36 @@ +#ifndef ICU4XTitlecaseOptionsV1_H +#define ICU4XTitlecaseOptionsV1_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#include "ICU4XLeadingAdjustment.h" +#include "ICU4XTrailingCase.h" +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XTitlecaseOptionsV1 { + ICU4XLeadingAdjustment leading_adjustment; + ICU4XTrailingCase trailing_case; +} ICU4XTitlecaseOptionsV1; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XLeadingAdjustment.h" +#include "ICU4XTrailingCase.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +ICU4XTitlecaseOptionsV1 ICU4XTitlecaseOptionsV1_default_options(); +void ICU4XTitlecaseOptionsV1_destroy(ICU4XTitlecaseOptionsV1* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XTrailingCase.h b/intl/icu_capi/c/include/ICU4XTrailingCase.h new file mode 100644 index 0000000000..d8957e0088 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XTrailingCase.h @@ -0,0 +1,31 @@ +#ifndef ICU4XTrailingCase_H +#define ICU4XTrailingCase_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XTrailingCase { + ICU4XTrailingCase_Lower = 0, + ICU4XTrailingCase_Unchanged = 1, +} ICU4XTrailingCase; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XTrailingCase_destroy(ICU4XTrailingCase* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XTransformResult.h b/intl/icu_capi/c/include/ICU4XTransformResult.h new file mode 100644 index 0000000000..66b268e266 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XTransformResult.h @@ -0,0 +1,31 @@ +#ifndef ICU4XTransformResult_H +#define ICU4XTransformResult_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XTransformResult { + ICU4XTransformResult_Modified = 0, + ICU4XTransformResult_Unmodified = 1, +} ICU4XTransformResult; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XTransformResult_destroy(ICU4XTransformResult* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XUnicodeSetData.h b/intl/icu_capi/c/include/ICU4XUnicodeSetData.h new file mode 100644 index 0000000000..3e10e53097 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XUnicodeSetData.h @@ -0,0 +1,48 @@ +#ifndef ICU4XUnicodeSetData_H +#define ICU4XUnicodeSetData_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XUnicodeSetData ICU4XUnicodeSetData; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h" +#include "ICU4XLocale.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +bool ICU4XUnicodeSetData_contains(const ICU4XUnicodeSetData* self, const char* s_data, size_t s_len); + +bool ICU4XUnicodeSetData_contains_char(const ICU4XUnicodeSetData* self, char32_t cp); + +bool ICU4XUnicodeSetData_contains32(const ICU4XUnicodeSetData* self, uint32_t cp); + +diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_basic_emoji(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_main(const ICU4XDataProvider* provider, const ICU4XLocale* locale); + +diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_auxiliary(const ICU4XDataProvider* provider, const ICU4XLocale* locale); + +diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_punctuation(const ICU4XDataProvider* provider, const ICU4XLocale* locale); + +diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_numbers(const ICU4XDataProvider* provider, const ICU4XLocale* locale); + +diplomat_result_box_ICU4XUnicodeSetData_ICU4XError ICU4XUnicodeSetData_load_exemplars_index(const ICU4XDataProvider* provider, const ICU4XLocale* locale); +void ICU4XUnicodeSetData_destroy(ICU4XUnicodeSetData* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XWeekCalculator.h b/intl/icu_capi/c/include/ICU4XWeekCalculator.h new file mode 100644 index 0000000000..02a52c6e87 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XWeekCalculator.h @@ -0,0 +1,39 @@ +#ifndef ICU4XWeekCalculator_H +#define ICU4XWeekCalculator_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XWeekCalculator ICU4XWeekCalculator; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h" +#include "ICU4XIsoWeekday.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XWeekCalculator_ICU4XError ICU4XWeekCalculator_create(const ICU4XDataProvider* provider, const ICU4XLocale* locale); + +ICU4XWeekCalculator* ICU4XWeekCalculator_create_from_first_day_of_week_and_min_week_days(ICU4XIsoWeekday first_weekday, uint8_t min_week_days); + +ICU4XIsoWeekday ICU4XWeekCalculator_first_weekday(const ICU4XWeekCalculator* self); + +uint8_t ICU4XWeekCalculator_min_week_days(const ICU4XWeekCalculator* self); +void ICU4XWeekCalculator_destroy(ICU4XWeekCalculator* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XWeekOf.h b/intl/icu_capi/c/include/ICU4XWeekOf.h new file mode 100644 index 0000000000..5441b943d4 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XWeekOf.h @@ -0,0 +1,33 @@ +#ifndef ICU4XWeekOf_H +#define ICU4XWeekOf_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#include "ICU4XWeekRelativeUnit.h" +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XWeekOf { + uint16_t week; + ICU4XWeekRelativeUnit unit; +} ICU4XWeekOf; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XWeekRelativeUnit.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XWeekOf_destroy(ICU4XWeekOf* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XWeekRelativeUnit.h b/intl/icu_capi/c/include/ICU4XWeekRelativeUnit.h new file mode 100644 index 0000000000..ee6802dc3b --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XWeekRelativeUnit.h @@ -0,0 +1,32 @@ +#ifndef ICU4XWeekRelativeUnit_H +#define ICU4XWeekRelativeUnit_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef enum ICU4XWeekRelativeUnit { + ICU4XWeekRelativeUnit_Previous = 0, + ICU4XWeekRelativeUnit_Current = 1, + ICU4XWeekRelativeUnit_Next = 2, +} ICU4XWeekRelativeUnit; +#ifdef __cplusplus +} // namespace capi +#endif +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +void ICU4XWeekRelativeUnit_destroy(ICU4XWeekRelativeUnit* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XWordBreakIteratorLatin1.h b/intl/icu_capi/c/include/ICU4XWordBreakIteratorLatin1.h new file mode 100644 index 0000000000..112025bdf5 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XWordBreakIteratorLatin1.h @@ -0,0 +1,34 @@ +#ifndef ICU4XWordBreakIteratorLatin1_H +#define ICU4XWordBreakIteratorLatin1_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XWordBreakIteratorLatin1 ICU4XWordBreakIteratorLatin1; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XSegmenterWordType.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +int32_t ICU4XWordBreakIteratorLatin1_next(ICU4XWordBreakIteratorLatin1* self); + +ICU4XSegmenterWordType ICU4XWordBreakIteratorLatin1_word_type(const ICU4XWordBreakIteratorLatin1* self); + +bool ICU4XWordBreakIteratorLatin1_is_word_like(const ICU4XWordBreakIteratorLatin1* self); +void ICU4XWordBreakIteratorLatin1_destroy(ICU4XWordBreakIteratorLatin1* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf16.h b/intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf16.h new file mode 100644 index 0000000000..676aea3cff --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf16.h @@ -0,0 +1,34 @@ +#ifndef ICU4XWordBreakIteratorUtf16_H +#define ICU4XWordBreakIteratorUtf16_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XWordBreakIteratorUtf16 ICU4XWordBreakIteratorUtf16; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XSegmenterWordType.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +int32_t ICU4XWordBreakIteratorUtf16_next(ICU4XWordBreakIteratorUtf16* self); + +ICU4XSegmenterWordType ICU4XWordBreakIteratorUtf16_word_type(const ICU4XWordBreakIteratorUtf16* self); + +bool ICU4XWordBreakIteratorUtf16_is_word_like(const ICU4XWordBreakIteratorUtf16* self); +void ICU4XWordBreakIteratorUtf16_destroy(ICU4XWordBreakIteratorUtf16* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf8.h b/intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf8.h new file mode 100644 index 0000000000..d8e98fb9b1 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XWordBreakIteratorUtf8.h @@ -0,0 +1,34 @@ +#ifndef ICU4XWordBreakIteratorUtf8_H +#define ICU4XWordBreakIteratorUtf8_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XWordBreakIteratorUtf8 ICU4XWordBreakIteratorUtf8; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XSegmenterWordType.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +int32_t ICU4XWordBreakIteratorUtf8_next(ICU4XWordBreakIteratorUtf8* self); + +ICU4XSegmenterWordType ICU4XWordBreakIteratorUtf8_word_type(const ICU4XWordBreakIteratorUtf8* self); + +bool ICU4XWordBreakIteratorUtf8_is_word_like(const ICU4XWordBreakIteratorUtf8* self); +void ICU4XWordBreakIteratorUtf8_destroy(ICU4XWordBreakIteratorUtf8* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XWordSegmenter.h b/intl/icu_capi/c/include/ICU4XWordSegmenter.h new file mode 100644 index 0000000000..5bef9437e0 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XWordSegmenter.h @@ -0,0 +1,44 @@ +#ifndef ICU4XWordSegmenter_H +#define ICU4XWordSegmenter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XWordSegmenter ICU4XWordSegmenter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h" +#include "ICU4XWordBreakIteratorUtf8.h" +#include "ICU4XWordBreakIteratorUtf16.h" +#include "ICU4XWordBreakIteratorLatin1.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_auto(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_lstm(const ICU4XDataProvider* provider); + +diplomat_result_box_ICU4XWordSegmenter_ICU4XError ICU4XWordSegmenter_create_dictionary(const ICU4XDataProvider* provider); + +ICU4XWordBreakIteratorUtf8* ICU4XWordSegmenter_segment_utf8(const ICU4XWordSegmenter* self, const char* input_data, size_t input_len); + +ICU4XWordBreakIteratorUtf16* ICU4XWordSegmenter_segment_utf16(const ICU4XWordSegmenter* self, const uint16_t* input_data, size_t input_len); + +ICU4XWordBreakIteratorLatin1* ICU4XWordSegmenter_segment_latin1(const ICU4XWordSegmenter* self, const uint8_t* input_data, size_t input_len); +void ICU4XWordSegmenter_destroy(ICU4XWordSegmenter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/ICU4XZonedDateTimeFormatter.h b/intl/icu_capi/c/include/ICU4XZonedDateTimeFormatter.h new file mode 100644 index 0000000000..77b228a5a2 --- /dev/null +++ b/intl/icu_capi/c/include/ICU4XZonedDateTimeFormatter.h @@ -0,0 +1,45 @@ +#ifndef ICU4XZonedDateTimeFormatter_H +#define ICU4XZonedDateTimeFormatter_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +#endif + +typedef struct ICU4XZonedDateTimeFormatter ICU4XZonedDateTimeFormatter; +#ifdef __cplusplus +} // namespace capi +#endif +#include "ICU4XDataProvider.h" +#include "ICU4XLocale.h" +#include "ICU4XDateLength.h" +#include "ICU4XTimeLength.h" +#include "diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h" +#include "ICU4XIsoTimeZoneOptions.h" +#include "ICU4XDateTime.h" +#include "ICU4XCustomTimeZone.h" +#include "diplomat_result_void_ICU4XError.h" +#include "ICU4XIsoDateTime.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError ICU4XZonedDateTimeFormatter_create_with_lengths(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length); + +diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError ICU4XZonedDateTimeFormatter_create_with_lengths_and_iso_8601_time_zone_fallback(const ICU4XDataProvider* provider, const ICU4XLocale* locale, ICU4XDateLength date_length, ICU4XTimeLength time_length, ICU4XIsoTimeZoneOptions zone_options); + +diplomat_result_void_ICU4XError ICU4XZonedDateTimeFormatter_format_datetime_with_custom_time_zone(const ICU4XZonedDateTimeFormatter* self, const ICU4XDateTime* datetime, const ICU4XCustomTimeZone* time_zone, DiplomatWriteable* write); + +diplomat_result_void_ICU4XError ICU4XZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(const ICU4XZonedDateTimeFormatter* self, const ICU4XIsoDateTime* datetime, const ICU4XCustomTimeZone* time_zone, DiplomatWriteable* write); +void ICU4XZonedDateTimeFormatter_destroy(ICU4XZonedDateTimeFormatter* self); + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_ICU4XAnyCalendarKind_void.h b/intl/icu_capi/c/include/diplomat_result_ICU4XAnyCalendarKind_void.h new file mode 100644 index 0000000000..f67f66ed4d --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_ICU4XAnyCalendarKind_void.h @@ -0,0 +1,24 @@ +#ifndef diplomat_result_ICU4XAnyCalendarKind_void_H +#define diplomat_result_ICU4XAnyCalendarKind_void_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#include "ICU4XAnyCalendarKind.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_ICU4XAnyCalendarKind_void { + union { + ICU4XAnyCalendarKind ok; + }; + bool is_ok; +} diplomat_result_ICU4XAnyCalendarKind_void; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_ICU4XPluralCategory_void.h b/intl/icu_capi/c/include/diplomat_result_ICU4XPluralCategory_void.h new file mode 100644 index 0000000000..b56ef60acb --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_ICU4XPluralCategory_void.h @@ -0,0 +1,24 @@ +#ifndef diplomat_result_ICU4XPluralCategory_void_H +#define diplomat_result_ICU4XPluralCategory_void_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#include "ICU4XPluralCategory.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_ICU4XPluralCategory_void { + union { + ICU4XPluralCategory ok; + }; + bool is_ok; +} diplomat_result_ICU4XPluralCategory_void; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_ICU4XWeekOf_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_ICU4XWeekOf_ICU4XError.h new file mode 100644 index 0000000000..4dee8f941f --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_ICU4XWeekOf_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_ICU4XWeekOf_ICU4XError_H +#define diplomat_result_ICU4XWeekOf_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#include "ICU4XWeekOf.h" +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_ICU4XWeekOf_ICU4XError { + union { + ICU4XWeekOf ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_ICU4XWeekOf_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_bool_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_bool_ICU4XError.h new file mode 100644 index 0000000000..015930214d --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_bool_ICU4XError.h @@ -0,0 +1,25 @@ +#ifndef diplomat_result_bool_ICU4XError_H +#define diplomat_result_bool_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_bool_ICU4XError { + union { + bool ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_bool_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h new file mode 100644 index 0000000000..0d18fe4076 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError_H +#define diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XBcp47ToIanaMapper ICU4XBcp47ToIanaMapper; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError { + union { + ICU4XBcp47ToIanaMapper* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XBcp47ToIanaMapper_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XBidi_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XBidi_ICU4XError.h new file mode 100644 index 0000000000..f1cd7ca6a3 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XBidi_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XBidi_ICU4XError_H +#define diplomat_result_box_ICU4XBidi_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XBidi ICU4XBidi; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XBidi_ICU4XError { + union { + ICU4XBidi* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XBidi_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCalendar_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCalendar_ICU4XError.h new file mode 100644 index 0000000000..bffa22c6b0 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCalendar_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XCalendar_ICU4XError_H +#define diplomat_result_box_ICU4XCalendar_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XCalendar ICU4XCalendar; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XCalendar_ICU4XError { + union { + ICU4XCalendar* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCalendar_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h new file mode 100644 index 0000000000..2c05f79671 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError_H +#define diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XCanonicalCombiningClassMap ICU4XCanonicalCombiningClassMap; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError { + union { + ICU4XCanonicalCombiningClassMap* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCanonicalCombiningClassMap_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h new file mode 100644 index 0000000000..66d0386ff8 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalComposition_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XCanonicalComposition_ICU4XError_H +#define diplomat_result_box_ICU4XCanonicalComposition_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XCanonicalComposition ICU4XCanonicalComposition; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XCanonicalComposition_ICU4XError { + union { + ICU4XCanonicalComposition* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCanonicalComposition_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h new file mode 100644 index 0000000000..cf02637fef --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError_H +#define diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XCanonicalDecomposition ICU4XCanonicalDecomposition; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError { + union { + ICU4XCanonicalDecomposition* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCanonicalDecomposition_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h new file mode 100644 index 0000000000..7b2a957399 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapCloser_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XCaseMapCloser_ICU4XError_H +#define diplomat_result_box_ICU4XCaseMapCloser_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XCaseMapCloser ICU4XCaseMapCloser; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XCaseMapCloser_ICU4XError { + union { + ICU4XCaseMapCloser* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCaseMapCloser_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapper_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapper_ICU4XError.h new file mode 100644 index 0000000000..c6e03a748c --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCaseMapper_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XCaseMapper_ICU4XError_H +#define diplomat_result_box_ICU4XCaseMapper_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XCaseMapper ICU4XCaseMapper; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XCaseMapper_ICU4XError { + union { + ICU4XCaseMapper* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCaseMapper_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h new file mode 100644 index 0000000000..fbe11daad2 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData16_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XCodePointMapData16_ICU4XError_H +#define diplomat_result_box_ICU4XCodePointMapData16_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XCodePointMapData16 ICU4XCodePointMapData16; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XCodePointMapData16_ICU4XError { + union { + ICU4XCodePointMapData16* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCodePointMapData16_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h new file mode 100644 index 0000000000..2e203279e3 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointMapData8_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XCodePointMapData8_ICU4XError_H +#define diplomat_result_box_ICU4XCodePointMapData8_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XCodePointMapData8 ICU4XCodePointMapData8; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XCodePointMapData8_ICU4XError { + union { + ICU4XCodePointMapData8* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCodePointMapData8_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h new file mode 100644 index 0000000000..e70e39ba61 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCodePointSetData_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XCodePointSetData_ICU4XError_H +#define diplomat_result_box_ICU4XCodePointSetData_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XCodePointSetData ICU4XCodePointSetData; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XCodePointSetData_ICU4XError { + union { + ICU4XCodePointSetData* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCodePointSetData_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCollator_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCollator_ICU4XError.h new file mode 100644 index 0000000000..abb5c8a598 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCollator_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XCollator_ICU4XError_H +#define diplomat_result_box_ICU4XCollator_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XCollator ICU4XCollator; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XCollator_ICU4XError { + union { + ICU4XCollator* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCollator_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h new file mode 100644 index 0000000000..d0c381ef03 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XComposingNormalizer_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XComposingNormalizer_ICU4XError_H +#define diplomat_result_box_ICU4XComposingNormalizer_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XComposingNormalizer ICU4XComposingNormalizer; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XComposingNormalizer_ICU4XError { + union { + ICU4XComposingNormalizer* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XComposingNormalizer_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h new file mode 100644 index 0000000000..4709a89871 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XCustomTimeZone_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XCustomTimeZone_ICU4XError_H +#define diplomat_result_box_ICU4XCustomTimeZone_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XCustomTimeZone ICU4XCustomTimeZone; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XCustomTimeZone_ICU4XError { + union { + ICU4XCustomTimeZone* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XCustomTimeZone_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDataProvider_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDataProvider_ICU4XError.h new file mode 100644 index 0000000000..a5be844183 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDataProvider_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XDataProvider_ICU4XError_H +#define diplomat_result_box_ICU4XDataProvider_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XDataProvider ICU4XDataProvider; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XDataProvider_ICU4XError { + union { + ICU4XDataProvider* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDataProvider_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDataStruct_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDataStruct_ICU4XError.h new file mode 100644 index 0000000000..d8c1d33e21 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDataStruct_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XDataStruct_ICU4XError_H +#define diplomat_result_box_ICU4XDataStruct_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XDataStruct ICU4XDataStruct; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XDataStruct_ICU4XError { + union { + ICU4XDataStruct* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDataStruct_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateFormatter_ICU4XError.h new file mode 100644 index 0000000000..b6d9671434 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateFormatter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XDateFormatter_ICU4XError_H +#define diplomat_result_box_ICU4XDateFormatter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XDateFormatter ICU4XDateFormatter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XDateFormatter_ICU4XError { + union { + ICU4XDateFormatter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDateFormatter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h new file mode 100644 index 0000000000..855e74fe6c --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError_H +#define diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XDateTimeFormatter ICU4XDateTimeFormatter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError { + union { + ICU4XDateTimeFormatter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDateTimeFormatter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTime_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTime_ICU4XError.h new file mode 100644 index 0000000000..2d4cb2fe48 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDateTime_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XDateTime_ICU4XError_H +#define diplomat_result_box_ICU4XDateTime_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XDateTime ICU4XDateTime; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XDateTime_ICU4XError { + union { + ICU4XDateTime* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDateTime_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDate_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDate_ICU4XError.h new file mode 100644 index 0000000000..30461b264a --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDate_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XDate_ICU4XError_H +#define diplomat_result_box_ICU4XDate_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XDate ICU4XDate; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XDate_ICU4XError { + union { + ICU4XDate* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDate_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h new file mode 100644 index 0000000000..c51d9907bc --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError_H +#define diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XDecomposingNormalizer ICU4XDecomposingNormalizer; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError { + union { + ICU4XDecomposingNormalizer* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XDecomposingNormalizer_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h new file mode 100644 index 0000000000..8ee245a093 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError_H +#define diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XFixedDecimalFormatter ICU4XFixedDecimalFormatter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError { + union { + ICU4XFixedDecimalFormatter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h new file mode 100644 index 0000000000..f45cd78fb9 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XFixedDecimal_ICU4XError_H +#define diplomat_result_box_ICU4XFixedDecimal_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XFixedDecimal ICU4XFixedDecimal; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XFixedDecimal_ICU4XError { + union { + ICU4XFixedDecimal* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XFixedDecimal_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h new file mode 100644 index 0000000000..98ff137a9a --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError_H +#define diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XGeneralCategoryNameToMaskMapper ICU4XGeneralCategoryNameToMaskMapper; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError { + union { + ICU4XGeneralCategoryNameToMaskMapper* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XGeneralCategoryNameToMaskMapper_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h new file mode 100644 index 0000000000..d560b381a5 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError_H +#define diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XGraphemeClusterSegmenter ICU4XGraphemeClusterSegmenter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError { + union { + ICU4XGraphemeClusterSegmenter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h new file mode 100644 index 0000000000..86b13be912 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError_H +#define diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XGregorianDateFormatter ICU4XGregorianDateFormatter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError { + union { + ICU4XGregorianDateFormatter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XGregorianDateFormatter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h new file mode 100644 index 0000000000..4393d9ffb0 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError_H +#define diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XGregorianDateTimeFormatter ICU4XGregorianDateTimeFormatter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError { + union { + ICU4XGregorianDateTimeFormatter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XGregorianDateTimeFormatter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h new file mode 100644 index 0000000000..270b38ba94 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError_H +#define diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XGregorianZonedDateTimeFormatter ICU4XGregorianZonedDateTimeFormatter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError { + union { + ICU4XGregorianZonedDateTimeFormatter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XGregorianZonedDateTimeFormatter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h new file mode 100644 index 0000000000..2e05730b0b --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError_H +#define diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XIanaToBcp47Mapper ICU4XIanaToBcp47Mapper; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError { + union { + ICU4XIanaToBcp47Mapper* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XIanaToBcp47Mapper_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h new file mode 100644 index 0000000000..8a55b47a68 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDateTime_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XIsoDateTime_ICU4XError_H +#define diplomat_result_box_ICU4XIsoDateTime_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XIsoDateTime ICU4XIsoDateTime; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XIsoDateTime_ICU4XError { + union { + ICU4XIsoDateTime* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XIsoDateTime_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDate_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDate_ICU4XError.h new file mode 100644 index 0000000000..8528d73b07 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XIsoDate_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XIsoDate_ICU4XError_H +#define diplomat_result_box_ICU4XIsoDate_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XIsoDate ICU4XIsoDate; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XIsoDate_ICU4XError { + union { + ICU4XIsoDate* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XIsoDate_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h new file mode 100644 index 0000000000..004d3494ae --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLineSegmenter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XLineSegmenter_ICU4XError_H +#define diplomat_result_box_ICU4XLineSegmenter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XLineSegmenter ICU4XLineSegmenter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XLineSegmenter_ICU4XError { + union { + ICU4XLineSegmenter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLineSegmenter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XListFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XListFormatter_ICU4XError.h new file mode 100644 index 0000000000..df40aa2dae --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XListFormatter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XListFormatter_ICU4XError_H +#define diplomat_result_box_ICU4XListFormatter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XListFormatter ICU4XListFormatter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XListFormatter_ICU4XError { + union { + ICU4XListFormatter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XListFormatter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h new file mode 100644 index 0000000000..a49bb700ca --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError_H +#define diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XLocaleCanonicalizer ICU4XLocaleCanonicalizer; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError { + union { + ICU4XLocaleCanonicalizer* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLocaleCanonicalizer_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h new file mode 100644 index 0000000000..740f9d99fa --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError_H +#define diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XLocaleDirectionality ICU4XLocaleDirectionality; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError { + union { + ICU4XLocaleDirectionality* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLocaleDirectionality_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h new file mode 100644 index 0000000000..6b0f09b2a2 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError_H +#define diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XLocaleDisplayNamesFormatter ICU4XLocaleDisplayNamesFormatter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError { + union { + ICU4XLocaleDisplayNamesFormatter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLocaleDisplayNamesFormatter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h new file mode 100644 index 0000000000..c7275e699c --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleExpander_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XLocaleExpander_ICU4XError_H +#define diplomat_result_box_ICU4XLocaleExpander_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XLocaleExpander ICU4XLocaleExpander; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XLocaleExpander_ICU4XError { + union { + ICU4XLocaleExpander* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLocaleExpander_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h new file mode 100644 index 0000000000..0dc002718e --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError_H +#define diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XLocaleFallbackerWithConfig ICU4XLocaleFallbackerWithConfig; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError { + union { + ICU4XLocaleFallbackerWithConfig* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLocaleFallbackerWithConfig_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h new file mode 100644 index 0000000000..3427bf3e3a --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError_H +#define diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XLocaleFallbacker ICU4XLocaleFallbacker; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError { + union { + ICU4XLocaleFallbacker* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLocaleFallbacker_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocale_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocale_ICU4XError.h new file mode 100644 index 0000000000..f5720b612f --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XLocale_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XLocale_ICU4XError_H +#define diplomat_result_box_ICU4XLocale_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XLocale ICU4XLocale; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XLocale_ICU4XError { + union { + ICU4XLocale* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XLocale_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h new file mode 100644 index 0000000000..ebd519e0b5 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError_H +#define diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XMetazoneCalculator ICU4XMetazoneCalculator; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError { + union { + ICU4XMetazoneCalculator* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XMetazoneCalculator_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralOperands_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralOperands_ICU4XError.h new file mode 100644 index 0000000000..7c068ba4b8 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralOperands_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XPluralOperands_ICU4XError_H +#define diplomat_result_box_ICU4XPluralOperands_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XPluralOperands ICU4XPluralOperands; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XPluralOperands_ICU4XError { + union { + ICU4XPluralOperands* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XPluralOperands_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralRules_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralRules_ICU4XError.h new file mode 100644 index 0000000000..4fa522b850 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XPluralRules_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XPluralRules_ICU4XError_H +#define diplomat_result_box_ICU4XPluralRules_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XPluralRules ICU4XPluralRules; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XPluralRules_ICU4XError { + union { + ICU4XPluralRules* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XPluralRules_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h new file mode 100644 index 0000000000..047ef959b0 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError_H +#define diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XPropertyValueNameToEnumMapper ICU4XPropertyValueNameToEnumMapper; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError { + union { + ICU4XPropertyValueNameToEnumMapper* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XPropertyValueNameToEnumMapper_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h new file mode 100644 index 0000000000..fcf7e88a23 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError_H +#define diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XRegionDisplayNames ICU4XRegionDisplayNames; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError { + union { + ICU4XRegionDisplayNames* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XRegionDisplayNames_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h new file mode 100644 index 0000000000..bffd6161aa --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError_H +#define diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XScriptWithExtensions ICU4XScriptWithExtensions; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError { + union { + ICU4XScriptWithExtensions* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XScriptWithExtensions_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h new file mode 100644 index 0000000000..a8ab968fa9 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError_H +#define diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XSentenceSegmenter ICU4XSentenceSegmenter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError { + union { + ICU4XSentenceSegmenter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XSentenceSegmenter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h new file mode 100644 index 0000000000..0e63cbbc2a --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeFormatter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XTimeFormatter_ICU4XError_H +#define diplomat_result_box_ICU4XTimeFormatter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XTimeFormatter ICU4XTimeFormatter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XTimeFormatter_ICU4XError { + union { + ICU4XTimeFormatter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XTimeFormatter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h new file mode 100644 index 0000000000..5f4851051e --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError_H +#define diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XTimeZoneFormatter ICU4XTimeZoneFormatter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError { + union { + ICU4XTimeZoneFormatter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XTimeZoneFormatter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XTime_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTime_ICU4XError.h new file mode 100644 index 0000000000..3e58b1e4da --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTime_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XTime_ICU4XError_H +#define diplomat_result_box_ICU4XTime_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XTime ICU4XTime; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XTime_ICU4XError { + union { + ICU4XTime* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XTime_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h new file mode 100644 index 0000000000..f8b017cfd4 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError_H +#define diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XTitlecaseMapper ICU4XTitlecaseMapper; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError { + union { + ICU4XTitlecaseMapper* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XTitlecaseMapper_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h new file mode 100644 index 0000000000..6dd14e82b6 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XUnicodeSetData_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XUnicodeSetData_ICU4XError_H +#define diplomat_result_box_ICU4XUnicodeSetData_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XUnicodeSetData ICU4XUnicodeSetData; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XUnicodeSetData_ICU4XError { + union { + ICU4XUnicodeSetData* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XUnicodeSetData_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h new file mode 100644 index 0000000000..1f547fd383 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XWeekCalculator_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XWeekCalculator_ICU4XError_H +#define diplomat_result_box_ICU4XWeekCalculator_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XWeekCalculator ICU4XWeekCalculator; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XWeekCalculator_ICU4XError { + union { + ICU4XWeekCalculator* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XWeekCalculator_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h new file mode 100644 index 0000000000..e41c59b661 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XWordSegmenter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XWordSegmenter_ICU4XError_H +#define diplomat_result_box_ICU4XWordSegmenter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XWordSegmenter ICU4XWordSegmenter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XWordSegmenter_ICU4XError { + union { + ICU4XWordSegmenter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XWordSegmenter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h new file mode 100644 index 0000000000..52a0ab4462 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError.h @@ -0,0 +1,26 @@ +#ifndef diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError_H +#define diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +typedef struct ICU4XZonedDateTimeFormatter ICU4XZonedDateTimeFormatter; +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError { + union { + ICU4XZonedDateTimeFormatter* ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_box_ICU4XZonedDateTimeFormatter_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_int32_t_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_int32_t_ICU4XError.h new file mode 100644 index 0000000000..adbe148dd1 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_int32_t_ICU4XError.h @@ -0,0 +1,25 @@ +#ifndef diplomat_result_int32_t_ICU4XError_H +#define diplomat_result_int32_t_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_int32_t_ICU4XError { + union { + int32_t ok; + ICU4XError err; + }; + bool is_ok; +} diplomat_result_int32_t_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_uint16_t_void.h b/intl/icu_capi/c/include/diplomat_result_uint16_t_void.h new file mode 100644 index 0000000000..3adeb5f36d --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_uint16_t_void.h @@ -0,0 +1,23 @@ +#ifndef diplomat_result_uint16_t_void_H +#define diplomat_result_uint16_t_void_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_uint16_t_void { + union { + uint16_t ok; + }; + bool is_ok; +} diplomat_result_uint16_t_void; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_void_ICU4XError.h b/intl/icu_capi/c/include/diplomat_result_void_ICU4XError.h new file mode 100644 index 0000000000..f092491e34 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_void_ICU4XError.h @@ -0,0 +1,24 @@ +#ifndef diplomat_result_void_ICU4XError_H +#define diplomat_result_void_ICU4XError_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#include "ICU4XError.h" +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_void_ICU4XError { + union { + ICU4XError err; + }; + bool is_ok; +} diplomat_result_void_ICU4XError; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_result_void_void.h b/intl/icu_capi/c/include/diplomat_result_void_void.h new file mode 100644 index 0000000000..2d5cc704e5 --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_result_void_void.h @@ -0,0 +1,20 @@ +#ifndef diplomat_result_void_void_H +#define diplomat_result_void_void_H +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include "diplomat_runtime.h" + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif +typedef struct diplomat_result_void_void { + bool is_ok; +} diplomat_result_void_void; +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif +#endif diff --git a/intl/icu_capi/c/include/diplomat_runtime.h b/intl/icu_capi/c/include/diplomat_runtime.h new file mode 100644 index 0000000000..de0f9c76fe --- /dev/null +++ b/intl/icu_capi/c/include/diplomat_runtime.h @@ -0,0 +1,70 @@ +#ifndef DIPLOMAT_RUNTIME_C_H +#define DIPLOMAT_RUNTIME_C_H + +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include <sys/types.h> + +// uchar.h doesn't always exist, but char32_t is always available +// in C++ anyway +#ifndef __cplusplus +#ifdef __APPLE__ +#include <stdint.h> +typedef uint16_t char16_t; +typedef uint32_t char32_t; +#else +#include <uchar.h> +#endif +#endif + + +#ifdef __cplusplus +namespace capi { +extern "C" { +#endif + +typedef struct DiplomatWriteable { + void* context; + char* buf; + size_t len; + size_t cap; + void (*flush)(struct DiplomatWriteable*); + bool (*grow)(struct DiplomatWriteable*, size_t); +} DiplomatWriteable; + +DiplomatWriteable diplomat_simple_writeable(char* buf, size_t buf_size); + +typedef struct DiplomatStringView { + const char* data; + size_t len; +} DiplomatStringView; + +#define MAKE_SLICE_VIEW(name, c_ty) \ + typedef struct Diplomat##name##View { \ + const c_ty* data; \ + size_t len; \ + } Diplomat##name##View; + +MAKE_SLICE_VIEW(I8, int8_t) +MAKE_SLICE_VIEW(U8, uint8_t) +MAKE_SLICE_VIEW(I16, int16_t) +MAKE_SLICE_VIEW(U16, uint16_t) +MAKE_SLICE_VIEW(I32, int32_t) +MAKE_SLICE_VIEW(U32, uint32_t) +MAKE_SLICE_VIEW(I64, int64_t) +MAKE_SLICE_VIEW(U64, uint64_t) +MAKE_SLICE_VIEW(Isize, intptr_t) +MAKE_SLICE_VIEW(Usize, size_t) +MAKE_SLICE_VIEW(F32, float) +MAKE_SLICE_VIEW(F64, double) +MAKE_SLICE_VIEW(Bool, bool) +MAKE_SLICE_VIEW(Char, char32_t) + + +#ifdef __cplusplus +} // extern "C" +} // namespace capi +#endif + +#endif |