Adaptor refactor
[platform/core/uifw/dali-adaptor.git] / third-party / libunibreak / wordbreakdef.h
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 Tom Hacohen <tom at stosb dot com>
8  * Copyright (C) 2013 Petr Filipsky <philodej 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 21, for
35  * Unicode 6.2.0:
36  *      <URL:http://www.unicode.org/reports/tr29/tr29-21.html>
37  *
38  * The Unicode Terms of Use are available at
39  *      <URL:http://www.unicode.org/copyright.html>
40  */
41
42 /**
43  * @file    wordbreakdef.h
44  *
45  * Definitions of internal data structures, declarations of global
46  * variables, and function prototypes for the word breaking algorithm.
47  *
48  * @version 2.4, 2013/11/10
49  * @author  Tom Hacohen
50  * @author  Petr Filipsky
51  */
52
53 /**
54  * Word break classes.  This is a direct mapping of Table 3 of Unicode
55  * Standard Annex 29, Revision 23.
56  */
57 enum WordBreakClass
58 {
59     WBP_Undefined,
60     WBP_CR,
61     WBP_LF,
62     WBP_Newline,
63     WBP_Extend,
64     WBP_Format,
65     WBP_Katakana,
66     WBP_ALetter,
67     WBP_MidNumLet,
68     WBP_MidLetter,
69     WBP_MidNum,
70     WBP_Numeric,
71     WBP_ExtendNumLet,
72     WBP_Regional,
73     WBP_Hebrew,
74     WBP_Single,
75     WBP_Double,
76     WBP_Any
77 };
78
79 /**
80  * Struct for entries of word break properties.  The array of the
81  * entries \e must be sorted.
82  */
83 struct WordBreakProperties
84 {
85     utf32_t start;              /**< Starting coding point */
86     utf32_t end;                /**< End coding point */
87     enum WordBreakClass prop;   /**< The word breaking property */
88 };