]> git.saurik.com Git - apple/icu.git/blob - icuSources/layout/StateTables.h
ICU-511.27.tar.gz
[apple/icu.git] / icuSources / layout / StateTables.h
1 /*
2 *
3 * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved
4 *
5 */
6
7 #ifndef __STATETABLES_H
8 #define __STATETABLES_H
9
10 /**
11 * \file
12 * \internal
13 */
14
15 #include "LETypes.h"
16 #include "LayoutTables.h"
17
18 U_NAMESPACE_BEGIN
19
20 struct StateTableHeader
21 {
22 le_int16 stateSize;
23 ByteOffset classTableOffset;
24 ByteOffset stateArrayOffset;
25 ByteOffset entryTableOffset;
26 };
27
28 struct StateTableHeader2
29 {
30 le_uint32 nClasses;
31 le_uint32 classTableOffset;
32 le_uint32 stateArrayOffset;
33 le_uint32 entryTableOffset;
34 };
35
36 enum ClassCodes
37 {
38 classCodeEOT = 0,
39 classCodeOOB = 1,
40 classCodeDEL = 2,
41 classCodeEOL = 3,
42 classCodeFirstFree = 4,
43 classCodeMAX = 0xFF
44 };
45
46 typedef le_uint8 ClassCode;
47
48 struct ClassTable
49 {
50 TTGlyphID firstGlyph;
51 le_uint16 nGlyphs;
52 ClassCode classArray[ANY_NUMBER];
53 };
54
55 enum StateNumber
56 {
57 stateSOT = 0,
58 stateSOL = 1,
59 stateFirstFree = 2,
60 stateMAX = 0xFF
61 };
62
63 typedef le_uint8 EntryTableIndex;
64
65 struct StateEntry
66 {
67 ByteOffset newStateOffset;
68 le_int16 flags;
69 };
70
71 typedef le_uint16 EntryTableIndex2;
72
73 struct StateEntry2 // same struct different interpretation
74 {
75 le_uint16 newStateIndex;
76 le_uint16 flags;
77 };
78
79 U_NAMESPACE_END
80 #endif
81