Merge "Make GlyphBufferData as another class" into devel/master
[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-15 Tom Hacohen <tom at stosb dot com>
8  *
9  * This software is provided 'as-is', without any express or implied
10  * warranty.  In no event will the author be held liable for any damages
11  * arising from the use of this software.
12  *
13  * Permission is granted to anyone to use this software for any purpose,
14  * including commercial applications, and to alter it and redistribute
15  * it freely, subject to the following restrictions:
16  *
17  * 1. The origin of this software must not be misrepresented; you must
18  *    not claim that you wrote the original software.  If you use this
19  *    software in a product, an acknowledgement in the product
20  *    documentation would be appreciated but is not required.
21  * 2. Altered source versions must be plainly marked as such, and must
22  *    not be misrepresented as being the original software.
23  * 3. This notice may not be removed or altered from any source
24  *    distribution.
25  *
26  * The main reference is Unicode Standard Annex 29 (UAX #29):
27  *      <URL:http://unicode.org/reports/tr29>
28  *
29  * When this library was designed, this annex was at Revision 17, for
30  * Unicode 6.0.0:
31  *      <URL:http://www.unicode.org/reports/tr29/tr29-17.html>
32  *
33  * This library has been updated according to Revision 25, for
34  * Unicode 7.0.0:
35  *
36  * The Unicode Terms of Use are available at
37  *      <URL:http://www.unicode.org/copyright.html>
38  */
39
40 /**
41  * @file    wordbreakdef.h
42  *
43  * Definitions of internal data structures, declarations of global
44  * variables, and function prototypes for the word breaking algorithm.
45  *
46  * @version 2.6, 2015/04/19
47  * @author  Tom Hacohen
48  */
49
50 #include "unibreakdef.h"
51
52 /**
53  * Word break classes.  This is a direct mapping of Table 3 of Unicode
54  * Standard Annex 29, Revision 23.
55  */
56 enum WordBreakClass
57 {
58     WBP_Undefined,
59     WBP_CR,
60     WBP_LF,
61     WBP_Newline,
62     WBP_Extend,
63     WBP_Regional_Indicator,
64     WBP_Format,
65     WBP_Katakana,
66     WBP_Hebrew_Letter,
67     WBP_ALetter,
68     WBP_Single_Quote,
69     WBP_Double_Quote,
70     WBP_MidNumLet,
71     WBP_MidLetter,
72     WBP_MidNum,
73     WBP_Numeric,
74     WBP_ExtendNumLet,
75     WBP_Any
76 };
77
78 /**
79  * Struct for entries of word break properties.  The array of the
80  * entries \e must be sorted.
81  */
82 struct WordBreakProperties
83 {
84     utf32_t start;              /**< Starting coding point */
85     utf32_t end;                /**< End coding point */
86     enum WordBreakClass prop;   /**< The word breaking property */
87 };