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