mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
Make GraphemeBreakProperty available globally
This commit is contained in:
parent
203e9f6c58
commit
e976cf67fd
3 changed files with 21 additions and 21 deletions
|
|
@ -1177,10 +1177,10 @@ def gen_char_props() -> None:
|
|||
gp('import "unsafe"')
|
||||
gp(f'const MAX_UNICODE = {sys.maxunicode}')
|
||||
gp(f'const UNICODE_LIMIT = {sys.maxunicode + 1}')
|
||||
generate_enum(c, gp, 'GraphemeBreakProperty', *grapheme_segmentation_maps, prefix='GBP_')
|
||||
generate_enum(c, gp, 'IndicConjunctBreak', *incb_map, prefix='ICB_')
|
||||
cen('// UCBDeclaration {{''{')
|
||||
cen(f'#define MAX_UNICODE ({sys.maxunicode}u)')
|
||||
generate_enum(cen, gp, 'GraphemeBreakProperty', *grapheme_segmentation_maps, prefix='GBP_')
|
||||
generate_enum(c, gp, 'IndicConjunctBreak', *incb_map, prefix='ICB_')
|
||||
generate_enum(cen, gp, 'UnicodeCategory', 'Cn', *class_maps, prefix='UC_')
|
||||
cen('// EndUCBDeclaration }}''}')
|
||||
gp(make_bitfield('tools/wcswidth', 'CharProps', *CharProps.go_fields(), add_package=False)[1])
|
||||
|
|
|
|||
19
kitty/char-props-data.h
generated
19
kitty/char-props-data.h
generated
|
|
@ -3,25 +3,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
typedef enum GraphemeBreakProperty {
|
||||
GBP_AtStart,
|
||||
GBP_None,
|
||||
GBP_Prepend,
|
||||
GBP_CR,
|
||||
GBP_LF,
|
||||
GBP_Control,
|
||||
GBP_Extend,
|
||||
GBP_Regional_Indicator,
|
||||
GBP_SpacingMark,
|
||||
GBP_L,
|
||||
GBP_V,
|
||||
GBP_T,
|
||||
GBP_LV,
|
||||
GBP_LVT,
|
||||
GBP_ZWJ,
|
||||
GBP_Private_Expecting_RI,
|
||||
} GraphemeBreakProperty;
|
||||
|
||||
typedef enum IndicConjunctBreak {
|
||||
ICB_None,
|
||||
ICB_Linker,
|
||||
|
|
|
|||
|
|
@ -105,6 +105,25 @@ static_assert(sizeof(GraphemeSegmentationResult) == sizeof(uint16_t), "Fix the o
|
|||
|
||||
// UCBDeclaration {{{
|
||||
#define MAX_UNICODE (1114111u)
|
||||
typedef enum GraphemeBreakProperty {
|
||||
GBP_AtStart,
|
||||
GBP_None,
|
||||
GBP_Prepend,
|
||||
GBP_CR,
|
||||
GBP_LF,
|
||||
GBP_Control,
|
||||
GBP_Extend,
|
||||
GBP_Regional_Indicator,
|
||||
GBP_SpacingMark,
|
||||
GBP_L,
|
||||
GBP_V,
|
||||
GBP_T,
|
||||
GBP_LV,
|
||||
GBP_LVT,
|
||||
GBP_ZWJ,
|
||||
GBP_Private_Expecting_RI,
|
||||
} GraphemeBreakProperty;
|
||||
|
||||
typedef enum UnicodeCategory {
|
||||
UC_Cn,
|
||||
UC_Cc,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue