1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2004
National Institute of Advanced Industrial Science and Technology (AIST)
This file is part of the m17n library documentation.
See the end for copying conditions.
-->
<html><head><meta http-equiv="Content-Type" content="text/html;charset="UTF-8">
<title>The m17n Library</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<a name="top-of-page"></a>
<hr><center>
<a class="qindex" href="index.html">Main Page</a>
<a class="qindex" href="modules.html">Modules</a>
<!-- <a class="qindex" href="classes.html">Alphabetical List</a> -->
<a class="qindex" href="annotated.html">Data Structures</a>
<!-- <a class="qindex" href="files.html">File List</a> -->
<!-- <a class="qindex" href="functions.html">Data Fields</a> -->
<a class="qindex" href="globals.html">Globals</a>
<a class="qindex" href="pages.html">Appendix</a>
</center>
<hr>
<!-- Generated by Doxygen 1.3.9.1 -->
<h1>Introduction</h1>Introduction to the m17n library.
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nIntro.html#ga1">M17NLIB_MAJOR_VERSION</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nIntro.html#ga2">M17NLIB_MINOR_VERSION</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nIntro.html#ga3">M17NLIB_PATCH_LEVEL</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nIntro.html#ga4">M17NLIB_VERSION_NAME</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nIntro.html#ga5">M17N_INIT</a>()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize the m17n library. <a href="#ga5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nIntro.html#ga6">M17N_FINI</a>()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Finalize the m17n library. <a href="#ga6"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nIntro.html#ga7">M17NStatus</a> { <br>
<a class="el" href="group__m17nIntro.html#gga7a26">M17N_NOT_INITIALIZED</a>,
<br>
<a class="el" href="group__m17nIntro.html#gga7a27">M17N_CORE_INITIALIZED</a>,
<br>
<a class="el" href="group__m17nIntro.html#gga7a28">M17N_SHELL_INITIALIZED</a>,
<br>
<a class="el" href="group__m17nIntro.html#gga7a29">M17N_GUI_INITIALIZED</a>
<br>
}</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enumeration for the status of the m17n library. <a href="#ga7">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum <a class="el" href="group__m17nIntro.html#ga7">M17NStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nIntro.html#ga0">m17n_status</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Report which part of the m17n library is initialized. <a href="#ga0"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<em>API LEVELS</em><p>
The API of the m17n library is divided into these four.<p>
<ol>
<li>
CORE API<p>
It provides basic modules to handle M-texts. They do not require the m17n database. To use this API, an application program must include <m17n-core<em></em>.h> and be linked by -lm17n-core.<p>
</li>
<li>
SHELL API<p>
It provides modules that utilize the m17n database (code conversion, character property, etc). They load various kinds of data from the database on demand. To use this API, an application program must include <m17n<em></em>.h> and be linked by -lm17n-core -lm17n.<p>
When you use this API, CORE API is also available.<p>
</li>
<li>
GUI API<p>
It provides GUI modules such as drawing and inputting M-texts on a graphic device. The API itself is independent on a graphic device but most functions require an argument MFrame which is created for a specific type of graphic device. Currently, a null device, X Window System, and an image date (gdImagePtr) of GD library are supported as a graphic device.<p>
On a frame of the null device, you can't draw text nor use an input method (but, for instance, the funciton <a class="el" href="group__m17nDraw.html#ga9">mdraw_glyph_list()</a> is available).<p>
On a frame of the X Window System, you can use the whole GUI API.<p>
On a frame of GD library, you can use all drawing API but can't use input method.<p>
To use this device, an application program must include <m17n-gui<em></em>.h> and be linked by -lm17n-core -lm17n -lm17n-gui.<p>
When you use this API, CORE and SHELL API are also available.<p>
</li>
<li>
MISC API<p>
It provides miscellaneous functions to support error handling and debugging. This API cannot be used by itself, but with one or more APIs listed above. To use the API, an application program must include <m17n-misc<em></em>.h> in addition to one of a header file described above.<p>
</li>
</ol>
<p>
See also the section <a class="el" href="m17n-config.html">m17n-config(1)</a>.<p>
<em>ENVIRONMENT VARIABLE</em><p>
The m17n library pays attention to these environment variables.<p>
<ul>
<li>
<code>M17NDIR</code> <p>
Name of a directory that contains data of the m17n database. See <a class="el" href="group__m17nDatabase.html">Database</a> for more details.<p>
</li>
<li>
<code>MDEBUG_XXXX</code> <p>
Environment variables whose name start by "MDEBUG_" controls printing of debug information. See <a class="el" href="group__m17nDebug.html">Debugging</a> for more details.<p>
</li>
</ul>
<p>
<em>API NAMING CONVENTION</em><p>
The library exports functions, variables, macros, and types. All of them start by the letter 'm' or 'M' followed by an object name (e.g. "symbol" and "plist", but "mtext" object is given the name "text" to avoid double 'm' at the head) or a module name (e.g. draw, input).<p>
<ul>
<li>
functions -- mobject() or mobject_xxx()<p>
They start with 'm' followed by lower case object name. For example, <a class="el" href="group__m17nSymbol.html#ga5">msymbol()</a>, <a class="el" href="group__m17nMtext.html#ga6">mtext_ref_char()</a>, <a class="el" href="group__m17nDraw.html#ga2">mdraw_text()</a>.<p>
</li>
<li>
non-symbol variables -- mobject, or mobject_xxx<p>
The naming convention is the same as functions (e.g. mface_large).<p>
</li>
<li>
symbol variables -- Mname<p>
Variables of type MSymbol start with 'M' followed by their names (e.g. Mlanguage (name is "language"), Miso_2022 (name is "iso-2022").<p>
</li>
<li>
macros -- MOBJECT_XXX<p>
They start by 'M' followed by upper case object names.<p>
</li>
<li>
types -- MObject or MObjectXxx<p>
They start by 'M' followed by capitalized object names (e.g. <a class="el" href="structMConverter.html">MConverter</a>, <a class="el" href="structMInputDriver.html">MInputDriver</a>).<p>
</li>
</ul>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="ga1" doxytag="m17n-core.c::M17NLIB_MAJOR_VERSION"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">#define M17NLIB_MAJOR_VERSION </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nIntro.html#ga1">M17NLIB_MAJOR_VERSION</a> macro gives the major version number of the m17n library. </td>
</tr>
</table>
<a class="anchor" name="ga2" doxytag="m17n-core.c::M17NLIB_MINOR_VERSION"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">#define M17NLIB_MINOR_VERSION </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nIntro.html#ga2">M17NLIB_MINOR_VERSION</a> macro gives the minor version number of the m17n library. </td>
</tr>
</table>
<a class="anchor" name="ga3" doxytag="m17n-core.c::M17NLIB_PATCH_LEVEL"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">#define M17NLIB_PATCH_LEVEL </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nIntro.html#ga3">M17NLIB_PATCH_LEVEL</a> macro gives the patch level number of the m17n library. </td>
</tr>
</table>
<a class="anchor" name="ga4" doxytag="m17n-core.c::M17NLIB_VERSION_NAME"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">#define M17NLIB_VERSION_NAME </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nIntro.html#ga4">M17NLIB_VERSION_NAME</a> macro gives the version name of the m17n library as a string. </td>
</tr>
</table>
<a class="anchor" name="ga5" doxytag="m17n-core.c::M17N_INIT"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">#define M17N_INIT </td>
<td class="md" valign="top">( </td>
</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The macro <a class="el" href="group__m17nIntro.html#ga5">M17N_INIT()</a> initializes the m17n library. This macro must be called before any m17n functions are used.<p>
It is safe to call this macro multiple times, but in that case, the macro <a class="el" href="group__m17nIntro.html#ga6">M17N_FINI()</a> must be called the same times to free the memory.<p>
If the initialization was successful, the external variable <a class="el" href="group__m17nError.html#ga0">merror_code</a> is set to 0. Otherwise it is set to -1.<p>
<dl compact><dt><b>See Also:</b></dt><dd><a class="el" href="group__m17nIntro.html#ga6">M17N_FINI()</a>, <a class="el" href="group__m17nIntro.html#ga0">m17n_status()</a> </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga6" doxytag="m17n-core.c::M17N_FINI"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">#define M17N_FINI </td>
<td class="md" valign="top">( </td>
</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The macro <a class="el" href="group__m17nIntro.html#ga6">M17N_FINI()</a> finalizes the m17n library. It frees all the memory area used by the m17n library. Once this macro is called, no m17n functions should be used until the macro <a class="el" href="group__m17nIntro.html#ga5">M17N_INIT()</a> is called again.<p>
If the macro <a class="el" href="group__m17nIntro.html#ga5">M17N_INIT()</a> was called N times, the Nth call of this macro actually free the memory.<p>
<dl compact><dt><b>See Also:</b></dt><dd><a class="el" href="group__m17nIntro.html#ga5">M17N_INIT()</a>, <a class="el" href="group__m17nIntro.html#ga0">m17n_status()</a> </dd></dl>
</td>
</tr>
</table>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="ga7" doxytag="m17n-core.h::M17NStatus"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">enum <a class="el" href="group__m17nIntro.html#ga7">M17NStatus</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The enum <a class="el" href="group__m17nIntro.html#ga7">M17NStatus</a> is used as a return value of the function <a class="el" href="group__m17nIntro.html#ga0">m17n_status()</a>. <dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="gga7a26" doxytag="M17N_NOT_INITIALIZED"></a>M17N_NOT_INITIALIZED</em> </td><td>
No modules is initialized, and all modules are finalized. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga7a27" doxytag="M17N_CORE_INITIALIZED"></a>M17N_CORE_INITIALIZED</em> </td><td>
Only the modules in CORE API are initialized. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga7a28" doxytag="M17N_SHELL_INITIALIZED"></a>M17N_SHELL_INITIALIZED</em> </td><td>
Only the modules in CORE and SHELL APIs are initialized. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga7a29" doxytag="M17N_GUI_INITIALIZED"></a>M17N_GUI_INITIALIZED</em> </td><td>
All modules are initialized. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga0" doxytag="m17n-core.c::m17n_status"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">enum <a class="el" href="group__m17nIntro.html#ga7">M17NStatus</a> m17n_status </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nIntro.html#ga0">m17n_status()</a> function returns one of these values depending on which part of the m17n library is initialized:<p>
<a class="el" href="group__m17nIntro.html#gga7a26">M17N_NOT_INITIALIZED</a>, <a class="el" href="group__m17nIntro.html#gga7a27">M17N_CORE_INITIALIZED</a>, <a class="el" href="group__m17nIntro.html#gga7a28">M17N_SHELL_INITIALIZED</a>, <a class="el" href="group__m17nIntro.html#gga7a29">M17N_GUI_INITIALIZED</a> </td>
</tr>
</table>
<hr>
<center>
<a href="#top-of-page">Top of this page</a><br><br>
<a class="qindex" href="index.html">Main Page</a>
<a class="qindex" href="modules.html">Modules</a>
<!-- <a class="qindex" href="classes.html">Alphabetical List</a> -->
<a class="qindex" href="annotated.html">Data Structures</a>
<!-- <a class="qindex" href="files.html">File List</a> -->
<!-- <a class="qindex" href="functions.html">Data Fields</a> -->
<a class="qindex" href="globals.html">Globals</a>
<a class="qindex" href="pages.html">Appendix</a>
</center>
<hr>
<ADDRESS>
<a href="http://www.m17n.org/m17n-lib/index.html" target="mulewindow"><img src="parrot.png" align=bottom alt="mulemark" border=0></a>
<A HREF="mailto:mule-aist@m17n.org">mule-aist@m17n.org</a>
</ADDRESS>
</body>
</HTML>
<!-- Copyright information
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2004
National Institute of Advanced Industrial Science and Technology (AIST)
This file is part of the m17n library documentation.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Section, Front-Cover Texts "The m17n library documentation",
and no Back-Cover Texts. A copy of the license is included in the
appendix entitled "GNU Free Documentation License".
-->
|