libunibreak 4.3

wordbreakdef.h
Go to the documentation of this file.
1 /* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
2
3 /*
4 * Word breaking in a Unicode sequence. Designed to be used in a
5 * generic text renderer.
6 *
7 * Copyright (C) 2013-2019 Tom Hacohen <tom at stosb dot com>
8 * Copyright (C) 2018 Wu Yongwei <wuyongwei at gmail dot com>
9 *
10 * This software is provided 'as-is', without any express or implied
11 * warranty. In no event will the author be held liable for any damages
12 * arising from the use of this software.
13 *
14 * Permission is granted to anyone to use this software for any purpose,
15 * including commercial applications, and to alter it and redistribute
16 * it freely, subject to the following restrictions:
17 *
18 * 1. The origin of this software must not be misrepresented; you must
19 * not claim that you wrote the original software. If you use this
20 * software in a product, an acknowledgement in the product
21 * documentation would be appreciated but is not required.
22 * 2. Altered source versions must be plainly marked as such, and must
23 * not be misrepresented as being the original software.
24 * 3. This notice may not be removed or altered from any source
25 * distribution.
26 *
27 * The main reference is Unicode Standard Annex 29 (UAX #29):
28 * <URL:http://unicode.org/reports/tr29>
29 *
30 * When this library was designed, this annex was at Revision 17, for
31 * Unicode 6.0.0:
32 * <URL:http://www.unicode.org/reports/tr29/tr29-17.html>
33 *
34 * This library has been updated according to Revision 37, for
35 * Unicode 13.0.0:
36 * <URL:http://www.unicode.org/reports/tr29/tr29-37.html>
37 *
38 * The Unicode Terms of Use are available at
39 * <URL:http://www.unicode.org/copyright.html>
40 */
41
51 #include "unibreakdef.h"
52
57 enum WordBreakClass
58 {
59 WBP_Undefined,
60 WBP_CR,
61 WBP_LF,
62 WBP_Newline,
63 WBP_Extend,
64 WBP_ZWJ,
65 WBP_Regional_Indicator,
66 WBP_Format,
67 WBP_Katakana,
68 WBP_Hebrew_Letter,
69 WBP_ALetter,
70 WBP_Single_Quote,
71 WBP_Double_Quote,
72 WBP_MidNumLet,
73 WBP_MidLetter,
74 WBP_MidNum,
75 WBP_Numeric,
76 WBP_ExtendNumLet,
77 WBP_WSegSpace,
78 WBP_Any
79 };
80
85 struct WordBreakProperties
86 {
87 utf32_t start;
88 utf32_t end;
89 enum WordBreakClass prop;
90 };
utf32_t
unsigned int utf32_t
Type for UTF-32 data points.
Definition: unibreakbase.h:49
WBP_Format
@ WBP_Format
Definition: wordbreakdef.h:66
WBP_LF
@ WBP_LF
Definition: wordbreakdef.h:61
WBP_Undefined
@ WBP_Undefined
Definition: wordbreakdef.h:59
WBP_MidNumLet
@ WBP_MidNumLet
Definition: wordbreakdef.h:72
WordBreakProperties::prop
enum WordBreakClass prop
The word breaking property.
Definition: wordbreakdef.h:89
WBP_MidLetter
@ WBP_MidLetter
Definition: wordbreakdef.h:73
WBP_Any
@ WBP_Any
Definition: wordbreakdef.h:78
WBP_Katakana
@ WBP_Katakana
Definition: wordbreakdef.h:67
WBP_Newline
@ WBP_Newline
Definition: wordbreakdef.h:62
WBP_Hebrew_Letter
@ WBP_Hebrew_Letter
Definition: wordbreakdef.h:68
WBP_Double_Quote
@ WBP_Double_Quote
Definition: wordbreakdef.h:71
WordBreakProperties::end
utf32_t end
End codepoint, inclusive.
Definition: wordbreakdef.h:88
WBP_Extend
@ WBP_Extend
Definition: wordbreakdef.h:63
WBP_Single_Quote
@ WBP_Single_Quote
Definition: wordbreakdef.h:70
WBP_WSegSpace
@ WBP_WSegSpace
Definition: wordbreakdef.h:77
WBP_ExtendNumLet
@ WBP_ExtendNumLet
Definition: wordbreakdef.h:76
WordBreakProperties
Struct for entries of word break properties.
Definition: wordbreakdef.h:86
WBP_MidNum
@ WBP_MidNum
Definition: wordbreakdef.h:74
WBP_Regional_Indicator
@ WBP_Regional_Indicator
Definition: wordbreakdef.h:65
WordBreakProperties::start
utf32_t start
Start codepoint.
Definition: wordbreakdef.h:87
unibreakdef.h
WBP_Numeric
@ WBP_Numeric
Definition: wordbreakdef.h:75
WBP_ALetter
@ WBP_ALetter
Definition: wordbreakdef.h:69
WBP_CR
@ WBP_CR
Definition: wordbreakdef.h:60
WBP_ZWJ
@ WBP_ZWJ
Definition: wordbreakdef.h:64
WordBreakClass
WordBreakClass
Word break classes.
Definition: wordbreakdef.h:58