1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-06 03:50:19 +02:00
FBReaderJ/native/sources/liblinebreak/liblinebreak-1.2/doc/html/linebreak_8h_source.html
Nikolay Pultsin 76dcfea536 fixed hyperlink processing in epub files
added liblinebreak sources and a stub for java liblinebreak bindings


git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@1002 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
2009-07-26 19:16:42 +00:00

108 lines
11 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>liblinebreak: linebreak.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<h1>linebreak.h</h1><a href="linebreak_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* vim: set tabstop=4 shiftwidth=4: */</span>
<a name="l00002"></a>00002
<a name="l00003"></a>00003 <span class="comment">/*</span>
<a name="l00004"></a>00004 <span class="comment"> * Line breaking in a Unicode sequence. Designed to be used in a</span>
<a name="l00005"></a>00005 <span class="comment"> * generic text renderer.</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> * Copyright (C) 2008-2009 Wu Yongwei &lt;wuyongwei at gmail dot com&gt;</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * This software is provided 'as-is', without any express or implied</span>
<a name="l00010"></a>00010 <span class="comment"> * warranty. In no event will the author be held liable for any damages</span>
<a name="l00011"></a>00011 <span class="comment"> * arising from the use of this software.</span>
<a name="l00012"></a>00012 <span class="comment"> *</span>
<a name="l00013"></a>00013 <span class="comment"> * Permission is granted to anyone to use this software for any purpose,</span>
<a name="l00014"></a>00014 <span class="comment"> * including commercial applications, and to alter it and redistribute</span>
<a name="l00015"></a>00015 <span class="comment"> * it freely, subject to the following restrictions:</span>
<a name="l00016"></a>00016 <span class="comment"> *</span>
<a name="l00017"></a>00017 <span class="comment"> * 1. The origin of this software must not be misrepresented; you must</span>
<a name="l00018"></a>00018 <span class="comment"> * not claim that you wrote the original software. If you use this</span>
<a name="l00019"></a>00019 <span class="comment"> * software in a product, an acknowledgement in the product</span>
<a name="l00020"></a>00020 <span class="comment"> * documentation would be appreciated but is not required.</span>
<a name="l00021"></a>00021 <span class="comment"> * 2. Altered source versions must be plainly marked as such, and must</span>
<a name="l00022"></a>00022 <span class="comment"> * not be misrepresented as being the original software.</span>
<a name="l00023"></a>00023 <span class="comment"> * 3. This notice may not be removed or altered from any source</span>
<a name="l00024"></a>00024 <span class="comment"> * distribution.</span>
<a name="l00025"></a>00025 <span class="comment"> *</span>
<a name="l00026"></a>00026 <span class="comment"> * The main reference is Unicode Standard Annex 14 (UAX #14):</span>
<a name="l00027"></a>00027 <span class="comment"> * &lt;URL:http://www.unicode.org/reports/tr14/&gt;</span>
<a name="l00028"></a>00028 <span class="comment"> *</span>
<a name="l00029"></a>00029 <span class="comment"> * When this library was designed, this annex was at Revision 19, for</span>
<a name="l00030"></a>00030 <span class="comment"> * Unicode 5.0.0:</span>
<a name="l00031"></a>00031 <span class="comment"> * &lt;URL:http://www.unicode.org/reports/tr14/tr14-19.html&gt;</span>
<a name="l00032"></a>00032 <span class="comment"> *</span>
<a name="l00033"></a>00033 <span class="comment"> * This library has been updated according to Revision 22, for</span>
<a name="l00034"></a>00034 <span class="comment"> * Unicode 5.1.0:</span>
<a name="l00035"></a>00035 <span class="comment"> * &lt;URL:http://www.unicode.org/reports/tr14/tr14-22.html&gt;</span>
<a name="l00036"></a>00036 <span class="comment"> *</span>
<a name="l00037"></a>00037 <span class="comment"> * The Unicode Terms of Use are available at</span>
<a name="l00038"></a>00038 <span class="comment"> * &lt;URL:http://www.unicode.org/copyright.html&gt;</span>
<a name="l00039"></a>00039 <span class="comment"> */</span>
<a name="l00040"></a>00040
<a name="l00050"></a>00050 <span class="preprocessor">#ifndef LINEBREAK_H</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#define LINEBREAK_H</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span>
<a name="l00053"></a>00053 <span class="preprocessor">#include &lt;stddef.h&gt;</span>
<a name="l00054"></a>00054
<a name="l00055"></a>00055 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
<a name="l00057"></a>00057 <span class="preprocessor">#endif</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span>
<a name="l00059"></a>00059 <span class="preprocessor">#ifndef LINEBREAK_UTF_TYPES_DEFINED</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#define LINEBREAK_UTF_TYPES_DEFINED</span>
<a name="l00061"></a><a class="code" href="linebreak_8h.html#6103b2105588f239c593e779e605038a">00061</a> <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="linebreak_8h.html#6103b2105588f239c593e779e605038a" title="Type for UTF-8 data points.">utf8_t</a>;
<a name="l00062"></a><a class="code" href="linebreak_8h.html#4dce96cad338d9281612277b2d80950c">00062</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="linebreak_8h.html#4dce96cad338d9281612277b2d80950c" title="Type for UTF-16 data points.">utf16_t</a>;
<a name="l00063"></a><a class="code" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25">00063</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="linebreak_8h.html#4f775bae0642c213be2c526018283c25" title="Type for UTF-32 data points.">utf32_t</a>;
<a name="l00064"></a>00064 <span class="preprocessor">#endif</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span>
<a name="l00066"></a><a class="code" href="linebreak_8h.html#367d64258fd90864a467687cd1736b77">00066</a> <span class="preprocessor">#define LINEBREAK_MUSTBREAK 0 </span>
<a name="l00067"></a><a class="code" href="linebreak_8h.html#229f34b0b72ccb2e53d0936a1e61a363">00067</a> <span class="preprocessor">#define LINEBREAK_ALLOWBREAK 1 </span>
<a name="l00068"></a><a class="code" href="linebreak_8h.html#dd176a107633817050bedf6eb4f491cc">00068</a> <span class="preprocessor">#define LINEBREAK_NOBREAK 2 </span>
<a name="l00069"></a><a class="code" href="linebreak_8h.html#5adf3d4831b89cb3e40e9bd31a73a39d">00069</a> <span class="preprocessor">#define LINEBREAK_INSIDEACHAR 3 </span>
<a name="l00077"></a>00077 <span class="preprocessor">void init_linebreak(void);</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span>
<a name="l00079"></a>00079 <span class="keywordtype">int</span> <a class="code" href="linebreak_8c.html#22abef1024a6392cf2bd2281fc1bd151" title="Tells whether a line break can occur between two Unicode characters.">is_breakable</a>(utf32_t char1, utf32_t char2, <span class="keyword">const</span> <span class="keywordtype">char</span>* lang);
<a name="l00080"></a>00080
<a name="l00091"></a>00091 <span class="keywordtype">void</span> <a class="code" href="linebreak_8c.html#b426e9cf68117faf583a0ed54742cb28" title="Sets the line breaking information for a UTF-8 input string.">set_linebreaks_utf8</a>(
<a name="l00092"></a>00092 <span class="keyword">const</span> utf8_t *s, <span class="keywordtype">size_t</span> len, <span class="keyword">const</span> <span class="keywordtype">char</span>* lang, <span class="keywordtype">char</span> *brks);
<a name="l00093"></a>00093
<a name="l00104"></a>00104 <span class="keywordtype">void</span> <a class="code" href="linebreak_8c.html#1d56bce2d32cd986052172638cec43c8" title="Sets the line breaking information for a UTF-16 input string.">set_linebreaks_utf16</a>(
<a name="l00105"></a>00105 <span class="keyword">const</span> utf16_t *s, <span class="keywordtype">size_t</span> len, <span class="keyword">const</span> <span class="keywordtype">char</span>* lang, <span class="keywordtype">char</span> *brks);
<a name="l00106"></a>00106
<a name="l00117"></a>00117 <span class="keywordtype">void</span> <a class="code" href="linebreak_8c.html#9fdce33b4ded9d586888c16228ae9e1f" title="Sets the line breaking information for a UTF-32 input string.">set_linebreaks_utf32</a>(
<a name="l00118"></a>00118 <span class="keyword">const</span> utf32_t *s, <span class="keywordtype">size_t</span> len, <span class="keyword">const</span> <span class="keywordtype">char</span>* lang, <span class="keywordtype">char</span> *brks);
<a name="l00119"></a>00119
<a name="l00134"></a><a class="code" href="linebreak_8h.html#9d54c1b18d4fc526a66ef64d9de9c63a">00134</a> <span class="preprocessor">#define is_line_breakable is_breakable</span>
<a name="l00135"></a>00135 <span class="preprocessor"></span>
<a name="l00136"></a>00136 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00137"></a>00137 <span class="preprocessor"></span>}
<a name="l00138"></a>00138 <span class="preprocessor">#endif</span>
<a name="l00139"></a>00139 <span class="preprocessor"></span>
<a name="l00140"></a>00140 <span class="preprocessor">#endif </span><span class="comment">/* LINEBREAK_H */</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 3 13:20:57 2009 for liblinebreak by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>