diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/static_deps/liblinebreak/linebreak.h | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2 SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz |
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/src/static_deps/liblinebreak/linebreak.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/libraries/evas/src/static_deps/liblinebreak/linebreak.h b/libraries/evas/src/static_deps/liblinebreak/linebreak.h new file mode 100644 index 0000000..abc1ae9 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/linebreak.h | |||
@@ -0,0 +1,87 @@ | |||
1 | /* vim: set tabstop=4 shiftwidth=4: */ | ||
2 | |||
3 | /* | ||
4 | * Line breaking in a Unicode sequence. Designed to be used in a | ||
5 | * generic text renderer. | ||
6 | * | ||
7 | * Copyright (C) 2008-2010 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 24, for | ||
34 | * Unicode 5.2.0: | ||
35 | * <URL:http://www.unicode.org/reports/tr14/tr14-24.html> | ||
36 | * | ||
37 | * The Unicode Terms of Use are available at | ||
38 | * <URL:http://www.unicode.org/copyright.html> | ||
39 | */ | ||
40 | |||
41 | /** | ||
42 | * @file linebreak.h | ||
43 | * | ||
44 | * Header file for the line breaking algorithm. | ||
45 | * | ||
46 | * @version 2.0, 2010/01/03 | ||
47 | * @author Wu Yongwei | ||
48 | */ | ||
49 | |||
50 | #ifndef LINEBREAK_H | ||
51 | #define LINEBREAK_H | ||
52 | |||
53 | #include <stddef.h> | ||
54 | |||
55 | #ifdef __cplusplus | ||
56 | extern "C" { | ||
57 | #endif | ||
58 | |||
59 | #define LINEBREAK_VERSION 0x0200 /**< Version of the library linebreak */ | ||
60 | extern const int linebreak_version; | ||
61 | |||
62 | #ifndef LINEBREAK_UTF_TYPES_DEFINED | ||
63 | #define LINEBREAK_UTF_TYPES_DEFINED | ||
64 | typedef unsigned char utf8_t; /**< Type for UTF-8 data points */ | ||
65 | typedef unsigned short utf16_t; /**< Type for UTF-16 data points */ | ||
66 | typedef unsigned int utf32_t; /**< Type for UTF-32 data points */ | ||
67 | #endif | ||
68 | |||
69 | #define LINEBREAK_MUSTBREAK 0 /**< Break is mandatory */ | ||
70 | #define LINEBREAK_ALLOWBREAK 1 /**< Break is allowed */ | ||
71 | #define LINEBREAK_NOBREAK 2 /**< No break is possible */ | ||
72 | #define LINEBREAK_INSIDEACHAR 3 /**< A UTF-8/16 sequence is unfinished */ | ||
73 | |||
74 | void init_linebreak(void); | ||
75 | void set_linebreaks_utf8( | ||
76 | const utf8_t *s, size_t len, const char* lang, char *brks); | ||
77 | void set_linebreaks_utf16( | ||
78 | const utf16_t *s, size_t len, const char* lang, char *brks); | ||
79 | void set_linebreaks_utf32( | ||
80 | const utf32_t *s, size_t len, const char* lang, char *brks); | ||
81 | int is_line_breakable(utf32_t char1, utf32_t char2, const char* lang); | ||
82 | |||
83 | #ifdef __cplusplus | ||
84 | } | ||
85 | #endif | ||
86 | |||
87 | #endif /* LINEBREAK_H */ | ||