1// © 2019 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
3
4// ulayout_props.h
5// created: 2019feb12 Markus W. Scherer
6
7#ifndef __ULAYOUT_PROPS_H__
8#define __ULAYOUT_PROPS_H__
9
10#include "unicode/utypes.h"
11
12// file definitions ------------------------------------------------------------
13
14#define ULAYOUT_DATA_NAME "ulayout"
15#define ULAYOUT_DATA_TYPE "icu"
16
17// data format "Layo"
18#define ULAYOUT_FMT_0 0x4c
19#define ULAYOUT_FMT_1 0x61
20#define ULAYOUT_FMT_2 0x79
21#define ULAYOUT_FMT_3 0x6f
22
23// indexes into indexes[]
24enum {
25 // Element 0 stores the length of the indexes[] array.
26 ULAYOUT_IX_INDEXES_LENGTH,
27 // Elements 1..7 store the tops of consecutive code point tries.
28 // No trie is stored if the difference between two of these is less than 16.
29 ULAYOUT_IX_INPC_TRIE_TOP,
30 ULAYOUT_IX_INSC_TRIE_TOP,
31 ULAYOUT_IX_VO_TRIE_TOP,
32 ULAYOUT_IX_RESERVED_TOP,
33
34 ULAYOUT_IX_TRIES_TOP = 7,
35
36 ULAYOUT_IX_MAX_VALUES = 9,
37
38 // Length of indexes[]. Multiple of 4 to 16-align the tries.
39 ULAYOUT_IX_COUNT = 12
40};
41
42constexpr int32_t ULAYOUT_MAX_INPC_SHIFT = 24;
43constexpr int32_t ULAYOUT_MAX_INSC_SHIFT = 16;
44constexpr int32_t ULAYOUT_MAX_VO_SHIFT = 8;
45
46#endif // __ULAYOUT_PROPS_H__
47