b823e507e2686119b3825fc99723b230fa598b98
[platform/core/uifw/dali-adaptor.git] / text / dali / internal / libunibreak / unibreakdef.h
1 /* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
2
3 /*
4  * Break processing in a Unicode sequence.  Designed to be used in a
5  * generic text renderer.
6  *
7  * Copyright (C) 2015 Wu Yongwei <wuyongwei at gmail 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 14 (UAX #14):
27  *      <URL:http://www.unicode.org/reports/tr14/>
28  *
29  * When this library was designed, this annex was at Revision 19, for
30  * Unicode 5.0.0:
31  *      <URL:http://www.unicode.org/reports/tr14/tr14-19.html>
32  *
33  * This library has been updated according to Revision 33, for
34  * Unicode 7.0.0:
35  *      <URL:http://www.unicode.org/reports/tr14/tr14-33.html>
36  *
37  * The Unicode Terms of Use are available at
38  *      <URL:http://www.unicode.org/copyright.html>
39  */
40
41 /**
42  * @file    unibreakdef.h
43  *
44  * Header file for private definitions in the libunibreak library.
45  *
46  * @version 1.1, 2015/04/19
47  * @author  Wu Yongwei
48  */
49
50 #ifndef UNIBREAKDEF_H
51 #define UNIBREAKDEF_H
52
53 #include "unibreakbase.h"
54
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58
59 /**
60  * Constant value to mark the end of string.  It is not a valid Unicode
61  * character.
62  */
63 #define EOS 0xFFFFFFFF
64
65 /**
66  * Abstract function interface for #ub_get_next_char_utf8,
67  * #ub_get_next_char_utf16, and #ub_get_next_char_utf32.
68  */
69 typedef utf32_t (*get_next_char_t)(const void *, size_t, size_t *);
70
71 /* Function Prototype */
72 utf32_t ub_get_next_char_utf8(const utf8_t *s, size_t len, size_t *ip);
73 utf32_t ub_get_next_char_utf16(const utf16_t *s, size_t len, size_t *ip);
74 utf32_t ub_get_next_char_utf32(const utf32_t *s, size_t len, size_t *ip);
75
76 #ifdef __cplusplus
77 }
78 #endif
79
80 #endif /* UNIBREAKDEF_H */