File: m17nIntro.3m17n

package info (click to toggle)
m17n-docs 1.6.2-2
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 22,492 kB
  • ctags: 1,495
  • sloc: sh: 1,032; makefile: 406; ansic: 206; perl: 108
file content (234 lines) | stat: -rw-r--r-- 8,145 bytes parent folder | download | duplicates (3)
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
.\" Copyright (C) 2001 Information-technology Promotion Agency (IPA)
.\" Copyright (C) 2001-2011
.\"   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, no Front-Cover Texts,
.\" and no Back-Cover Texts.  A copy of the license is included in the
.\" appendix entitled "GNU Free Documentation License".
.TH "Introduction" 3m17n "12 Jan 2011" "Version 1.6.2" "The m17n Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Introduction \- Introduction to the m17n library.  

.SS "Defines"

.in +1c
.ti -1c
.RI "#define \fBM17NLIB_MAJOR_VERSION\fP"
.br
.ti -1c
.RI "#define \fBM17NLIB_MINOR_VERSION\fP"
.br
.ti -1c
.RI "#define \fBM17NLIB_PATCH_LEVEL\fP"
.br
.ti -1c
.RI "#define \fBM17NLIB_VERSION_NAME\fP"
.br
.ti -1c
.RI "#define \fBM17N_INIT\fP()"
.br
.RI "\fIInitialize the m17n library. \fP"
.ti -1c
.RI "#define \fBM17N_FINI\fP()"
.br
.RI "\fIFinalize the m17n library. \fP"
.in -1c
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBM17NStatus\fP { \fBM17N_NOT_INITIALIZED\fP, \fBM17N_CORE_INITIALIZED\fP, \fBM17N_SHELL_INITIALIZED\fP, \fBM17N_GUI_INITIALIZED\fP }"
.br
.RI "\fIEnumeration for the status of the m17n library. \fP"
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "enum \fBM17NStatus\fP \fBm17n_status\fP (void)"
.br
.RI "\fIReport which part of the m17n library is initialized. \fP"
.in -1c
.SH "Detailed Description"
.PP 
Introduction to the m17n library. 

\fIAPI LEVELS\fP
.PP
The API of the m17n library is divided into these five.
.PP
.PD 0
.IP "1." 4
CORE API
.PP
It provides basic modules to handle M\-texts. To use this API, an application program must include <m17n\-core\fI\fP.h> and be linked with \-lm17n\-core.
.PP

.IP "2." 4
SHELL API
.PP
It provides modules for character properties, character set handling, code conversion, etc. They load various kinds of data from the database on demand. To use this API, an application program must include <m17n\fI\fP.h> and be linked with \-lm17n\-core \-lm17n.
.PP
When you use this API, CORE API is also available.
.PP

.IP "3." 4
FLT API
.PP
It provides modules for text shaping using \fBmdbFLT\fP. To use this API, an application program must include <m17n\fI\fP.h> and be linked with \-lm17n\-core \-lm17n\-flt.
.PP
When you use this API, CORE API is also available.
.PP

.IP "4." 4
GUI API
.PP
It provides GUI modules such as drawing and inputting M\-texts on a graphic device. This API itself is independent of graphic devices, but most functions require an argument MFrame that is created for a specific type of graphic devices. The currently supported graphic devices are null device, the X Window System, and image data (gdImagePtr) of the GD library.
.PP
On a frame of a null device, you cannot draw text nor use input methods. However, functions like \fBmdraw_glyph_list()\fP, etc. are available.
.PP
On a frame of the X Window System, you can use the whole GUI API.
.PP
On a frame of the GD library, you can use all drawing API but cannot use input methods.
.PP
To use this API, an application program must include <m17n\-gui\fI\fP.h> and be linked with \-lm17n\-core \-lm17n \-lm17n\-gui.
.PP
When you use this API, CORE, SHELL, and FLT APIs are also available.
.PP

.IP "5." 4
MISC API
.PP
It provides miscellaneous functions to support error handling and debugging. This API cannot be used standalone; it must be used with one or more APIs listed above. To use this API, an application program must include <m17n\-misc\fI\fP.h> in addition to one of the header files described above.
.PP

.PP
.PP
See also the section \fBm17n\-config(1)\fP.
.PP
\fIENVIRONMENT VARIABLES\fP
.PP
The m17n library pays attention to the following environment variables.
.PP
.PD 0
.IP "\(bu" 2
\fCM17NDIR\fP 
.PP
The name of the directory that contains data of the m17n database. See \fBDatabase\fP for details.
.PP

.IP "\(bu" 2
\fCMDEBUG_XXX\fP 
.PP
Environment variables whose names start with 'MDEBUG_' control debug information output. See \fBDebugging\fP for details.
.PP

.PP
.PP
\fIAPI NAMING CONVENTION\fP
.PP
The m17n library exports functions, variables, macros, and types. All of them start with the letter 'm' or 'M', and are followed by an object name (e.g. 'symbol', 'plist') or a module name (e.g. draw, input). Note that the name of M\-text objects start with 'mtext' and not with 'mmtext'.
.PP
.PD 0
.IP "\(bu" 2
functions \-\- mobject() or mobject_xxx()
.PP
They start with 'm' and are followed by an object name in lower case. Words are separated by '_'. For example, \fBmsymbol()\fP, \fBmtext_ref_char()\fP, \fBmdraw_text()\fP.
.PP

.IP "\(bu" 2
non\-symbol variables \-\- mobject, or mobject_xxx
.PP
The naming convention is the same as functions (e.g. mface_large).
.PP

.IP "\(bu" 2
symbol variables \-\- Mname
.PP
Variables of the type MSymbol start with 'M' and are followed by their names. Words are separated by '_'. For example, Mlanguage (the name is 'language'), Miso_2022 (the name is 'iso\-2022').
.PP

.IP "\(bu" 2
macros \-\- MOBJECT_XXX
.PP
They start with 'M' and are followed by an object name in upper case. Words are separated by '_'.
.PP

.IP "\(bu" 2
types \-\- MObject or MObjectXxx
.PP
They start with 'M' and are followed by capitalized object names. Words are concatenated directly and no '_' are used. For example, \fBMConverter\fP, \fBMInputDriver\fP.
.PP

.PP

.SH "Define Documentation"
.PP 
.SS "#define M17NLIB_MAJOR_VERSION"The \fBM17NLIB_MAJOR_VERSION\fP macro gives the major version number of the m17n library. 
.SS "#define M17NLIB_MINOR_VERSION"The \fBM17NLIB_MINOR_VERSION\fP macro gives the minor version number of the m17n library. 
.SS "#define M17NLIB_PATCH_LEVEL"The \fBM17NLIB_PATCH_LEVEL\fP macro gives the patch level number of the m17n library. 
.SS "#define M17NLIB_VERSION_NAME"The \fBM17NLIB_VERSION_NAME\fP macro gives the version name of the m17n library as a string. 
.SS "#define M17N_INIT()"
.PP
Initialize the m17n library. The macro \fBM17N_INIT()\fP initializes the m17n library. This macro must be called before any m17n functions are used.
.PP
It is safe to call this macro multiple times, but in that case, the macro \fBM17N_FINI()\fP must be called the same times to free the memory.
.PP
If the initialization was successful, the external variable \fBmerror_code\fP is set to 0. Otherwise it is set to \-1.
.PP

\fBSEE ALSO\fp
.RS 4
\fBM17N_FINI()\fP, \fBm17n_status()\fP 
.RE
.PP

.SS "#define M17N_FINI()"
.PP
Finalize the m17n library. The macro \fBM17N_FINI()\fP 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 \fBM17N_INIT()\fP is called again.
.PP
If the macro \fBM17N_INIT()\fP was called N times, the Nth call of this macro actually free the memory.
.PP

\fBSEE ALSO\fp
.RS 4
\fBM17N_INIT()\fP, \fBm17n_status()\fP 
.RE
.PP

.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBM17NStatus\fP"
.PP
Enumeration for the status of the m17n library. The enum \fBM17NStatus\fP is used as a return value of the function \fBm17n_status()\fP. 
.PP
\fBEnumerator: \fP
.in +1c
.TP
\fB\fIM17N_NOT_INITIALIZED \fP\fP
No modules is initialized, and all modules are finalized. 
.TP
\fB\fIM17N_CORE_INITIALIZED \fP\fP
Only the modules in CORE API are initialized. 
.TP
\fB\fIM17N_SHELL_INITIALIZED \fP\fP
Only the modules in CORE and SHELL APIs are initialized. 
.TP
\fB\fIM17N_GUI_INITIALIZED \fP\fP
All modules are initialized. 
.SH "Author"
.PP 
Generated automatically by Doxygen for The m17n Library from the source code.
.SH COPYRIGHT
Copyright (C) 2001 Information\-technology Promotion Agency (IPA)
.br
Copyright (C) 2001\-2011 National Institute of Advanced Industrial Science and Technology (AIST)
.br
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License 
<http://www.gnu.org/licenses/fdl.html>.