1\section{Input Method (basic)}
2\label{group__m17nInputMethod}\index{Input Method (basic)@{Input Method (basic)}}
3API for Input method.
4\subsection*{Data Structures}
5\begin{CompactItemize}
6\item
7struct {\bf MInputDriver}
8\begin{CompactList}\small\item\em Structure of input method driver. \item\end{CompactList}\item
9struct {\bf MInputMethod}
10\begin{CompactList}\small\item\em Structure of input method. \item\end{CompactList}\item
11struct {\bf MInputContext}
12\begin{CompactList}\small\item\em Structure of input context. \item\end{CompactList}\end{CompactItemize}
13\subsection*{Variables: Predefined symbols for callback commands.}
14These are the predefined symbols that are used as the {\tt COMMAND} argument of callback functions of an input method driver (see \doxyref{MInputDriver::callback\_\-list}{p.}{structMInputDriver_159fe7401cd0913dc8c480a18efeff64}).
15
16Most of them do not require extra argument nor return any value; exceptions are these:
17
18{\bf Minput\_\-get\_\-surrounding\_\-text:} When a callback function assigned for this command is called, the first element of \doxyref{MInputContext::plist}{p.}{structMInputContext_12f494b6550e5ec675c187766fb9e461} has key \doxyref{Minteger}{p.}{group__m17nPlist_g0ce08eb57aa339db4d4745e75e80fdd8} and the value specifies which portion of the surrounding text should be retrieved. If the value is positive, it specifies the number of characters following the current cursor position. If the value is negative, the absolute value specifies the number of characters preceding the current cursor position. If the value is zero, it means that the caller just wants to know if the surrounding text is currently supported or not.
19
20If the surrounding text is currently supported, the callback function must set the key of this element to \doxyref{Mtext}{p.}{group__m17nPlist_g1a22859374071a0ca66f12452afee8bd} and the value to the retrieved M-text. The length of the M-text may be shorter than the requested number of characters, if the available text is not that long. The length can be zero in the worst case. Or, the length may be longer if an application thinks it is more efficient to return that length.
21
22If the surrounding text is not currently supported, the callback function should return without changing the first element of \doxyref{MInputContext::plist}{p.}{structMInputContext_12f494b6550e5ec675c187766fb9e461}.
23
24{\bf Minput\_\-delete\_\-surrounding\_\-text:} When a callback function assigned for this command is called, the first element of \doxyref{MInputContext::plist}{p.}{structMInputContext_12f494b6550e5ec675c187766fb9e461} has key \doxyref{Minteger}{p.}{group__m17nPlist_g0ce08eb57aa339db4d4745e75e80fdd8} and the value specifies which portion of the surrounding text should be deleted in the same way as the case of Minput\_\-get\_\-surrounding\_\-text. The callback function must delete the specified text. It should not alter \doxyref{MInputContext::plist}{p.}{structMInputContext_12f494b6550e5ec675c187766fb9e461}. \begin{CompactItemize}
25\item
26{\bf MSymbol} {\bf Minput\_\-preedit\_\-start}
27\item
28{\bf MSymbol} {\bf Minput\_\-preedit\_\-done}
29\item
30{\bf MSymbol} {\bf Minput\_\-preedit\_\-draw}
31\item
32{\bf MSymbol} {\bf Minput\_\-status\_\-start}
33\item
34{\bf MSymbol} {\bf Minput\_\-status\_\-done}
35\item
36{\bf MSymbol} {\bf Minput\_\-status\_\-draw}
37\item
38{\bf MSymbol} {\bf Minput\_\-candidates\_\-start}
39\item
40{\bf MSymbol} {\bf Minput\_\-candidates\_\-done}
41\item
42{\bf MSymbol} {\bf Minput\_\-candidates\_\-draw}
43\item
44{\bf MSymbol} {\bf Minput\_\-set\_\-spot}
45\item
46{\bf MSymbol} {\bf Minput\_\-toggle}
47\item
48{\bf MSymbol} {\bf Minput\_\-reset}
49\item
50{\bf MSymbol} {\bf Minput\_\-get\_\-surrounding\_\-text}
51\item
52{\bf MSymbol} {\bf Minput\_\-delete\_\-surrounding\_\-text}
53\end{CompactItemize}
54\subsection*{Variables: Predefined symbols for special input events.}
55These are the predefined symbols that are used as the {\tt KEY} argument of \doxyref{minput\_\-filter()}{p.}{group__m17nInputMethod_g6d9c3c97524114496fd8b7f70af92457}. \begin{CompactItemize}
56\item
57{\bf MSymbol} {\bf Minput\_\-focus\_\-out}
58\item
59{\bf MSymbol} {\bf Minput\_\-focus\_\-in}
60\item
61{\bf MSymbol} {\bf Minput\_\-focus\_\-move}
62\end{CompactItemize}
63\subsection*{Variables: Predefined symbols used in input method information.}
64\begin{CompactItemize}
65\item
66{\bf MSymbol} {\bf Minherited}
67\item
68{\bf MSymbol} {\bf Mcustomized}
69\item
70{\bf MSymbol} {\bf Mconfigured}
71\end{CompactItemize}
72\subsection*{Functions}
73\begin{CompactItemize}
74\item
75{\bf MInputMethod} $\ast$ {\bf minput\_\-open\_\-im} ({\bf MSymbol} language, {\bf MSymbol} name, void $\ast$arg)
76\begin{CompactList}\small\item\em Open an input method. \item\end{CompactList}\item
77void {\bf minput\_\-close\_\-im} ({\bf MInputMethod} $\ast$im)
78\begin{CompactList}\small\item\em Close an input method. \item\end{CompactList}\item
79{\bf MInputContext} $\ast$ {\bf minput\_\-create\_\-ic} ({\bf MInputMethod} $\ast$im, void $\ast$arg)
80\begin{CompactList}\small\item\em Create an input context. \item\end{CompactList}\item
81void {\bf minput\_\-destroy\_\-ic} ({\bf MInputContext} $\ast$ic)
82\begin{CompactList}\small\item\em Destroy an input context. \item\end{CompactList}\item
83int {\bf minput\_\-filter} ({\bf MInputContext} $\ast$ic, {\bf MSymbol} key, void $\ast$arg)
84\begin{CompactList}\small\item\em Filter an input key. \item\end{CompactList}\item
85int {\bf minput\_\-lookup} ({\bf MInputContext} $\ast$ic, {\bf MSymbol} key, void $\ast$arg, {\bf MText} $\ast$mt)
86\begin{CompactList}\small\item\em Look up a text produced in the input context. \item\end{CompactList}\item
87void {\bf minput\_\-set\_\-spot} ({\bf MInputContext} $\ast$ic, int x, int y, int ascent, int descent, int fontsize, {\bf MText} $\ast$mt, int pos)
88\begin{CompactList}\small\item\em Set the spot of the input context. \item\end{CompactList}\item
89void {\bf minput\_\-toggle} ({\bf MInputContext} $\ast$ic)
90\begin{CompactList}\small\item\em Toggle input method. \item\end{CompactList}\item
91void {\bf minput\_\-reset\_\-ic} ({\bf MInputContext} $\ast$ic)
92\begin{CompactList}\small\item\em Reset an input context. \item\end{CompactList}\item
93{\bf MPlist} $\ast$ {\bf minput\_\-get\_\-title\_\-icon} ({\bf MSymbol} language, {\bf MSymbol} name)
94\begin{CompactList}\small\item\em Get title and icon filename of an input method. \item\end{CompactList}\item
95{\bf MText} $\ast$ {\bf minput\_\-get\_\-description} ({\bf MSymbol} language, {\bf MSymbol} name)
96\begin{CompactList}\small\item\em Get description text of an input method. \item\end{CompactList}\item
97{\bf MPlist} $\ast$ {\bf minput\_\-get\_\-command} ({\bf MSymbol} language, {\bf MSymbol} name, {\bf MSymbol} command)
98\begin{CompactList}\small\item\em Get information about input method command(s). \item\end{CompactList}\item
99int {\bf minput\_\-config\_\-command} ({\bf MSymbol} language, {\bf MSymbol} name, {\bf MSymbol} command, {\bf MPlist} $\ast$keyseqlist)
100\begin{CompactList}\small\item\em Configure the key sequence of an input method command. \item\end{CompactList}\item
101{\bf MPlist} $\ast$ {\bf minput\_\-get\_\-variable} ({\bf MSymbol} language, {\bf MSymbol} name, {\bf MSymbol} variable)
102\begin{CompactList}\small\item\em Get information about input method variable(s). \item\end{CompactList}\item
103int {\bf minput\_\-config\_\-variable} ({\bf MSymbol} language, {\bf MSymbol} name, {\bf MSymbol} variable, {\bf MPlist} $\ast$value)
104\begin{CompactList}\small\item\em Configure the value of an input method variable. \item\end{CompactList}\item
105char $\ast$ {\bf minput\_\-config\_\-file} ()
106\begin{CompactList}\small\item\em Get the name of per-user customization file. \item\end{CompactList}\item
107int {\bf minput\_\-save\_\-config} (void)
108\begin{CompactList}\small\item\em Save configurations in per-user customization file. \item\end{CompactList}\end{CompactItemize}
109\subsection*{Obsolete functions}
110\begin{CompactItemize}
111\item
112{\bf MPlist} $\ast$ {\bf minput\_\-get\_\-variables} ({\bf MSymbol} language, {\bf MSymbol} name)
113\begin{CompactList}\small\item\em Get a list of variables of an input method (obsolete). \item\end{CompactList}\item
114int {\bf minput\_\-set\_\-variable} ({\bf MSymbol} language, {\bf MSymbol} name, {\bf MSymbol} variable, void $\ast$value)
115\begin{CompactList}\small\item\em Set the initial value of an input method variable. \item\end{CompactList}\item
116{\bf MPlist} $\ast$ {\bf minput\_\-get\_\-commands} ({\bf MSymbol} language, {\bf MSymbol} name)
117\begin{CompactList}\small\item\em Get information about input method commands. \item\end{CompactList}\item
118int {\bf minput\_\-assign\_\-command\_\-keys} ({\bf MSymbol} language, {\bf MSymbol} name, {\bf MSymbol} command, {\bf MPlist} $\ast$keyseq)
119\begin{CompactList}\small\item\em Assign a key sequence to an input method command (obsolete). \item\end{CompactList}\item
120int {\bf minput\_\-callback} ({\bf MInputContext} $\ast$ic, {\bf MSymbol} command)
121\begin{CompactList}\small\item\em Call a callback function. \item\end{CompactList}\end{CompactItemize}
122\subsection*{Typedefs}
123\begin{CompactItemize}
124\item
125typedef struct {\bf MInputMethod} {\bf MInputMethod}
126\begin{CompactList}\small\item\em See struct \doxyref{MInputMethod}{p.}{structMInputMethod}. \item\end{CompactList}\item
127typedef struct {\bf MInputContext} {\bf MInputContext}
128\begin{CompactList}\small\item\em See struct \doxyref{MInputContext}{p.}{structMInputContext}. \item\end{CompactList}\item
129typedef void($\ast$ {\bf MInputCallbackFunc} )({\bf MInputContext} $\ast$ic, {\bf MSymbol} command)
130\begin{CompactList}\small\item\em Type of input method callback functions. \item\end{CompactList}\end{CompactItemize}
131\subsection*{Enumerations}
132\begin{CompactItemize}
133\item
134enum {\bf MInputCandidatesChanged} \{ \par
135{\bf MINPUT\_\-CANDIDATES\_\-LIST\_\-CHANGED} =  1,
136\par
137{\bf MINPUT\_\-CANDIDATES\_\-INDEX\_\-CHANGED} =  2,
138\par
139{\bf MINPUT\_\-CANDIDATES\_\-SHOW\_\-CHANGED} =  4,
140\par
141{\bf MINPUT\_\-CANDIDATES\_\-CHANGED\_\-MAX}
142 \}
143\begin{CompactList}\small\item\em Bit-masks to specify how candidates of input method is changed. \item\end{CompactList}\end{CompactItemize}
144\subsection*{Variables}
145\begin{CompactItemize}
146\item
147{\bf MSymbol} {\bf Minput\_\-method}
148\begin{CompactList}\small\item\em Symbol whose name is \char`\"{}input-method\char`\"{}. \item\end{CompactList}\item
149{\bf MInputDriver} {\bf minput\_\-default\_\-driver}
150\begin{CompactList}\small\item\em The default driver for internal input methods. \item\end{CompactList}\item
151{\bf MInputDriver} $\ast$ {\bf minput\_\-driver}
152\begin{CompactList}\small\item\em The driver for internal input methods. \item\end{CompactList}\item
153{\bf MSymbol} {\bf Minput\_\-driver}
154\end{CompactItemize}
155
156
157\subsection{Detailed Description}
158API for Input method.
159
160An input method is an object to enable inputting various characters. An input method is identified by a pair of symbols, LANGUAGE and NAME. This pair decides an input method driver of the input method. An input method driver is a set of functions for handling the input method. There are two kinds of input methods; internal one and foreign one.
161
162\begin{itemize}
163\item Internal Input Method
164
165An internal input method has non {\tt Mnil} LANGUAGE, and its body is defined in the m17n database by the tag $<$Minput\_\-method, LANGUAGE, NAME$>$. For this kind of input methods, the m17n library uses two predefined input method drivers, one for CUI use and the other for GUI use. Those drivers utilize the input processing engine provided by the m17n library itself. The m17n database may provide input methods that are not limited to a specific language. The database uses {\tt Mt} as LANGUAGE of those input methods.
166
167An internal input method accepts an input key which is a symbol associated with an input event. As there is no way for the {\tt m17n} {\tt library} to know how input events are represented in an application program, an application programmer has to convert an input event to an input key by himself. See the documentation of the function \doxyref{minput\_\-event\_\-to\_\-key()}{p.}{group__m17nInputMethodWin_g58715c630a04fd33f12394e9c93f1bad} for the detail.
168
169\item Foreign Input Method \label{group__m17nInputMethod_foreign-input-method}
170
171
172A foreign input method has {\tt Mnil} LANGUAGE, and its body is defined in an external resource (e.g. XIM of X Window System). For this kind of input methods, the symbol NAME must have a property of key \doxyref{Minput\_\-driver}{p.}{group__m17nInputMethod_gf03ec92f0d20d9bff8b9031461270d41}, and the value must be a pointer to an input method driver. Therefore, by preparing a proper driver, any kind of input method can be treated in the framework of the {\tt m17n} {\tt library}.
173
174For convenience, the m17n-X library provides an input method driver that enables the input style of OverTheSpot for XIM, and stores \doxyref{Minput\_\-driver}{p.}{group__m17nInputMethod_gf03ec92f0d20d9bff8b9031461270d41} property of the symbol {\tt Mxim} with a pointer to the driver. See the documentation of m17n GUI API for the detail.
175
176\end{itemize}
177
178
179PROCESSING FLOW
180
181The typical processing flow of handling an input method is:
182
183\begin{itemize}
184\item open an input method \item create an input context for the input method \item filter an input key \item look up a produced text in the input context \end{itemize}
185
186
187\subsection{Typedef Documentation}
188\index{m17nInputMethod@{m17nInputMethod}!MInputMethod@{MInputMethod}}
189\index{MInputMethod@{MInputMethod}!m17nInputMethod@{m17nInputMethod}}
190\subsubsection[MInputMethod]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf MInputMethod} {\bf MInputMethod}}\label{group__m17nInputMethod_g0d229da23cd279742e8eaf548187cede}
191
192
193See struct \doxyref{MInputMethod}{p.}{structMInputMethod}.
194
195\index{m17nInputMethod@{m17nInputMethod}!MInputContext@{MInputContext}}
196\index{MInputContext@{MInputContext}!m17nInputMethod@{m17nInputMethod}}
197\subsubsection[MInputContext]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf MInputContext} {\bf MInputContext}}\label{group__m17nInputMethod_g9be2a38f0b0cb91d1ef6056c30f1daba}
198
199
200See struct \doxyref{MInputContext}{p.}{structMInputContext}.
201
202\index{m17nInputMethod@{m17nInputMethod}!MInputCallbackFunc@{MInputCallbackFunc}}
203\index{MInputCallbackFunc@{MInputCallbackFunc}!m17nInputMethod@{m17nInputMethod}}
204\subsubsection[MInputCallbackFunc]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$ {\bf MInputCallbackFunc})({\bf MInputContext} $\ast$ic, {\bf MSymbol} command)}\label{group__m17nInputMethod_g93a20c4a45f229e921bc4a3e1aa85312}
205
206
207Type of input method callback functions.
208
209This is the type of callback functions called from input method drivers. {\bf ic} is a pointer to an input context, {\bf command} is a name of callback for which the function is called.
210
211\subsection{Enumeration Type Documentation}
212\index{m17nInputMethod@{m17nInputMethod}!MInputCandidatesChanged@{MInputCandidatesChanged}}
213\index{MInputCandidatesChanged@{MInputCandidatesChanged}!m17nInputMethod@{m17nInputMethod}}
214\subsubsection[MInputCandidatesChanged]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf MInputCandidatesChanged}}\label{group__m17nInputMethod_g55fdd3ec1e7a1ebcf84468c0637f4e42}
215
216
217Bit-masks to specify how candidates of input method is changed.
218
219\begin{Desc}
220\item[Enumerator: ]\par
221\begin{description}
222\index{MINPUT\_\-CANDIDATES\_\-LIST\_\-CHANGED@{MINPUT\_\-CANDIDATES\_\-LIST\_\-CHANGED}!m17nInputMethod@{m17nInputMethod}}\index{m17nInputMethod@{m17nInputMethod}!MINPUT\_\-CANDIDATES\_\-LIST\_\-CHANGED@{MINPUT\_\-CANDIDATES\_\-LIST\_\-CHANGED}}\item[{\em
223MINPUT\_\-CANDIDATES\_\-LIST\_\-CHANGED\label{group__m17nInputMethod_gg55fdd3ec1e7a1ebcf84468c0637f4e42175a5183c1e25d8c885f0896200738fa}
224}]\index{MINPUT\_\-CANDIDATES\_\-INDEX\_\-CHANGED@{MINPUT\_\-CANDIDATES\_\-INDEX\_\-CHANGED}!m17nInputMethod@{m17nInputMethod}}\index{m17nInputMethod@{m17nInputMethod}!MINPUT\_\-CANDIDATES\_\-INDEX\_\-CHANGED@{MINPUT\_\-CANDIDATES\_\-INDEX\_\-CHANGED}}\item[{\em
225MINPUT\_\-CANDIDATES\_\-INDEX\_\-CHANGED\label{group__m17nInputMethod_gg55fdd3ec1e7a1ebcf84468c0637f4e4259599bf8a86a08077f83d2451493d1ab}
226}]\index{MINPUT\_\-CANDIDATES\_\-SHOW\_\-CHANGED@{MINPUT\_\-CANDIDATES\_\-SHOW\_\-CHANGED}!m17nInputMethod@{m17nInputMethod}}\index{m17nInputMethod@{m17nInputMethod}!MINPUT\_\-CANDIDATES\_\-SHOW\_\-CHANGED@{MINPUT\_\-CANDIDATES\_\-SHOW\_\-CHANGED}}\item[{\em
227MINPUT\_\-CANDIDATES\_\-SHOW\_\-CHANGED\label{group__m17nInputMethod_gg55fdd3ec1e7a1ebcf84468c0637f4e423bb5a55a5ccf58331afe4ef07f18dd58}
228}]\index{MINPUT\_\-CANDIDATES\_\-CHANGED\_\-MAX@{MINPUT\_\-CANDIDATES\_\-CHANGED\_\-MAX}!m17nInputMethod@{m17nInputMethod}}\index{m17nInputMethod@{m17nInputMethod}!MINPUT\_\-CANDIDATES\_\-CHANGED\_\-MAX@{MINPUT\_\-CANDIDATES\_\-CHANGED\_\-MAX}}\item[{\em
229MINPUT\_\-CANDIDATES\_\-CHANGED\_\-MAX\label{group__m17nInputMethod_gg55fdd3ec1e7a1ebcf84468c0637f4e427a525f8a61edaae9febe3884e496ab27}
230}]\end{description}
231\end{Desc}
232
233
234
235\subsection{Function Documentation}
236\index{m17nInputMethod@{m17nInputMethod}!minput\_\-open\_\-im@{minput\_\-open\_\-im}}
237\index{minput\_\-open\_\-im@{minput\_\-open\_\-im}!m17nInputMethod@{m17nInputMethod}}
238\subsubsection[minput\_\-open\_\-im]{\setlength{\rightskip}{0pt plus 5cm}{\bf MInputMethod}$\ast$ minput\_\-open\_\-im ({\bf MSymbol} {\em language}, \/  {\bf MSymbol} {\em name}, \/  void $\ast$ {\em arg})}\label{group__m17nInputMethod_g34d3e527bfd705d2b7f2b749199c1e11}
239
240
241Open an input method.
242
243The \doxyref{minput\_\-open\_\-im()}{p.}{group__m17nInputMethod_g34d3e527bfd705d2b7f2b749199c1e11} function opens an input method whose language and name match {\bf language} and {\bf name}, and returns a pointer to the input method object newly allocated.
244
245This function at first decides a driver for the input method as described below.
246
247If {\bf language} is not \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb}, the driver pointed by the variable \doxyref{minput\_\-driver}{p.}{group__m17nInputMethod_g0e4d7a69ac0861d4b9b58990a0f03702} is used.
248
249If {\bf language} is \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb} and {\bf name} has the property \doxyref{Minput\_\-driver}{p.}{group__m17nInputMethod_gf03ec92f0d20d9bff8b9031461270d41}, the driver pointed to by the property value is used to open the input method. If {\bf name} has no such a property, {\tt NULL} is returned.
250
251Then, the member \doxyref{MInputDriver::open\_\-im()}{p.}{structMInputDriver_6de5d7d05acec89bf7e41b2f234082f7} of the driver is called.
252
253{\bf arg} is set in the member {\tt arg} of the structure \doxyref{MInputMethod}{p.}{structMInputMethod} so that the driver can refer to it. \index{m17nInputMethod@{m17nInputMethod}!minput\_\-close\_\-im@{minput\_\-close\_\-im}}
254\index{minput\_\-close\_\-im@{minput\_\-close\_\-im}!m17nInputMethod@{m17nInputMethod}}
255\subsubsection[minput\_\-close\_\-im]{\setlength{\rightskip}{0pt plus 5cm}void minput\_\-close\_\-im ({\bf MInputMethod} $\ast$ {\em im})}\label{group__m17nInputMethod_g373b415d157c2507f4ca4a864836e905}
256
257
258Close an input method.
259
260The \doxyref{minput\_\-close\_\-im()}{p.}{group__m17nInputMethod_g373b415d157c2507f4ca4a864836e905} function closes the input method {\bf im}, which must have been created by \doxyref{minput\_\-open\_\-im()}{p.}{group__m17nInputMethod_g34d3e527bfd705d2b7f2b749199c1e11}. \index{m17nInputMethod@{m17nInputMethod}!minput\_\-create\_\-ic@{minput\_\-create\_\-ic}}
261\index{minput\_\-create\_\-ic@{minput\_\-create\_\-ic}!m17nInputMethod@{m17nInputMethod}}
262\subsubsection[minput\_\-create\_\-ic]{\setlength{\rightskip}{0pt plus 5cm}{\bf MInputContext}$\ast$ minput\_\-create\_\-ic ({\bf MInputMethod} $\ast$ {\em im}, \/  void $\ast$ {\em arg})}\label{group__m17nInputMethod_g8b32df84c645f73ed65e20a1d51c1859}
263
264
265Create an input context.
266
267The \doxyref{minput\_\-create\_\-ic()}{p.}{group__m17nInputMethod_g8b32df84c645f73ed65e20a1d51c1859} function creates an input context object associated with input method {\bf im}, and calls callback functions corresponding to {\bf Minput\_\-preedit\_\-start}, {\bf Minput\_\-status\_\-start}, and {\bf Minput\_\-status\_\-draw} in this order.
268
269\begin{Desc}
270\item[Return value:]If an input context is successfully created, \doxyref{minput\_\-create\_\-ic()}{p.}{group__m17nInputMethod_g8b32df84c645f73ed65e20a1d51c1859} returns a pointer to it. Otherwise it returns {\tt NULL}. \end{Desc}
271\index{m17nInputMethod@{m17nInputMethod}!minput\_\-destroy\_\-ic@{minput\_\-destroy\_\-ic}}
272\index{minput\_\-destroy\_\-ic@{minput\_\-destroy\_\-ic}!m17nInputMethod@{m17nInputMethod}}
273\subsubsection[minput\_\-destroy\_\-ic]{\setlength{\rightskip}{0pt plus 5cm}void minput\_\-destroy\_\-ic ({\bf MInputContext} $\ast$ {\em ic})}\label{group__m17nInputMethod_g80e4b330fb112883f2183d54b4e9c5bb}
274
275
276Destroy an input context.
277
278The \doxyref{minput\_\-destroy\_\-ic()}{p.}{group__m17nInputMethod_g80e4b330fb112883f2183d54b4e9c5bb} function destroys the input context {\bf ic}, which must have been created by \doxyref{minput\_\-create\_\-ic()}{p.}{group__m17nInputMethod_g8b32df84c645f73ed65e20a1d51c1859}. It calls callback functions corresponding to {\bf Minput\_\-preedit\_\-done}, {\bf Minput\_\-status\_\-done}, and {\bf Minput\_\-candidates\_\-done} in this order. \index{m17nInputMethod@{m17nInputMethod}!minput\_\-filter@{minput\_\-filter}}
279\index{minput\_\-filter@{minput\_\-filter}!m17nInputMethod@{m17nInputMethod}}
280\subsubsection[minput\_\-filter]{\setlength{\rightskip}{0pt plus 5cm}int minput\_\-filter ({\bf MInputContext} $\ast$ {\em ic}, \/  {\bf MSymbol} {\em key}, \/  void $\ast$ {\em arg})}\label{group__m17nInputMethod_g6d9c3c97524114496fd8b7f70af92457}
281
282
283Filter an input key.
284
285The \doxyref{minput\_\-filter()}{p.}{group__m17nInputMethod_g6d9c3c97524114496fd8b7f70af92457} function filters input key {\bf key} according to input context {\bf ic}, and calls callback functions corresponding to {\bf Minput\_\-preedit\_\-draw}, {\bf Minput\_\-status\_\-draw}, and {\bf Minput\_\-candidates\_\-draw} if the preedit text, the status, and the current candidate are changed respectively.
286
287To make the input method commit the current preedit text (if any) and shift to the initial state, call this function with \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb} as {\bf key}.
288
289To inform the input method about the focus-out event, call this function with {\bf Minput\_\-focus\_\-out} as {\bf key}.
290
291To inform the input method about the focus-in event, call this function with {\bf Minput\_\-focus\_\-in} as {\bf key}.
292
293To inform the input method about the focus-move event (i.e. input spot change within the same input context), call this function with {\bf Minput\_\-focus\_\-move} as {\bf key}.
294
295\begin{Desc}
296\item[Return value:]If {\bf key} is filtered out, this function returns 1. In that case, the caller should discard the key. Otherwise, it returns 0, and the caller should handle the key, for instance, by calling the function \doxyref{minput\_\-lookup()}{p.}{group__m17nInputMethod_gfe533480c705b877189938a0eecb1b57} with the same key. \end{Desc}
297\index{m17nInputMethod@{m17nInputMethod}!minput\_\-lookup@{minput\_\-lookup}}
298\index{minput\_\-lookup@{minput\_\-lookup}!m17nInputMethod@{m17nInputMethod}}
299\subsubsection[minput\_\-lookup]{\setlength{\rightskip}{0pt plus 5cm}int minput\_\-lookup ({\bf MInputContext} $\ast$ {\em ic}, \/  {\bf MSymbol} {\em key}, \/  void $\ast$ {\em arg}, \/  {\bf MText} $\ast$ {\em mt})}\label{group__m17nInputMethod_gfe533480c705b877189938a0eecb1b57}
300
301
302Look up a text produced in the input context.
303
304The \doxyref{minput\_\-lookup()}{p.}{group__m17nInputMethod_gfe533480c705b877189938a0eecb1b57} function looks up a text in the input context {\bf ic}. {\bf key} must be identical to the one that was used in the previous call of \doxyref{minput\_\-filter()}{p.}{group__m17nInputMethod_g6d9c3c97524114496fd8b7f70af92457}.
305
306If a text was produced by the input method, it is concatenated to M-text {\bf mt}.
307
308This function calls \doxyref{MInputDriver::lookup}{p.}{structMInputDriver_8b206e6ce988f1aeafac41efadf493af} .
309
310\begin{Desc}
311\item[Return value:]If {\bf key} was correctly handled by the input method, this function returns 0. Otherwise, it returns -1, even though some text might be produced in {\bf mt}. \end{Desc}
312\index{m17nInputMethod@{m17nInputMethod}!minput\_\-set\_\-spot@{minput\_\-set\_\-spot}}
313\index{minput\_\-set\_\-spot@{minput\_\-set\_\-spot}!m17nInputMethod@{m17nInputMethod}}
314\subsubsection[minput\_\-set\_\-spot]{\setlength{\rightskip}{0pt plus 5cm}void minput\_\-set\_\-spot ({\bf MInputContext} $\ast$ {\em ic}, \/  int {\em x}, \/  int {\em y}, \/  int {\em ascent}, \/  int {\em descent}, \/  int {\em fontsize}, \/  {\bf MText} $\ast$ {\em mt}, \/  int {\em pos})}\label{group__m17nInputMethod_gc12030bd2d5c265a7327a9487f9c1376}
315
316
317Set the spot of the input context.
318
319The \doxyref{minput\_\-set\_\-spot()}{p.}{group__m17nInputMethod_gc12030bd2d5c265a7327a9487f9c1376} function sets the spot of input context {\bf ic} to coordinate ({\bf x}, {\bf y} ) with the height specified by {\bf ascent} and {\bf descent} . The semantics of these values depends on the input method driver.
320
321For instance, a driver designed to work in a CUI environment may use {\bf x} and {\bf y} as the column- and row numbers, and may ignore {\bf ascent} and {\bf descent} . A driver designed to work in a window system may interpret {\bf x} and {\bf y} as the pixel offsets relative to the origin of the client window, and may interpret {\bf ascent} and {\bf descent} as the ascent- and descent pixels of the line at ({\bf x} . {\bf y} ).
322
323{\bf fontsize} specifies the fontsize of preedit text in 1/10 point.
324
325{\bf mt} and {\bf pos} are the M-text and the character position at the spot. {\bf mt} may be {\tt NULL}, in which case, the input method cannot get information about the text around the spot. \index{m17nInputMethod@{m17nInputMethod}!minput\_\-toggle@{minput\_\-toggle}}
326\index{minput\_\-toggle@{minput\_\-toggle}!m17nInputMethod@{m17nInputMethod}}
327\subsubsection[minput\_\-toggle]{\setlength{\rightskip}{0pt plus 5cm}void minput\_\-toggle ({\bf MInputContext} $\ast$ {\em ic})}\label{group__m17nInputMethod_g065a8f8e5a28180fd0fa6d160e07481b}
328
329
330Toggle input method.
331
332The \doxyref{minput\_\-toggle()}{p.}{group__m17nInputMethod_g065a8f8e5a28180fd0fa6d160e07481b} function toggles the input method associated with input context {\bf ic}. \index{m17nInputMethod@{m17nInputMethod}!minput\_\-reset\_\-ic@{minput\_\-reset\_\-ic}}
333\index{minput\_\-reset\_\-ic@{minput\_\-reset\_\-ic}!m17nInputMethod@{m17nInputMethod}}
334\subsubsection[minput\_\-reset\_\-ic]{\setlength{\rightskip}{0pt plus 5cm}void minput\_\-reset\_\-ic ({\bf MInputContext} $\ast$ {\em ic})}\label{group__m17nInputMethod_g1c3c2263d2bb2d250b1f926f4b4c1db5}
335
336
337Reset an input context.
338
339The \doxyref{minput\_\-reset\_\-ic()}{p.}{group__m17nInputMethod_g1c3c2263d2bb2d250b1f926f4b4c1db5} function resets input context {\bf ic} by calling a callback function corresponding to {\bf Minput\_\-reset}. It resets the status of {\bf ic} to its initial one. As the current preedit text is deleted without commitment, if necessary, call \doxyref{minput\_\-filter()}{p.}{group__m17nInputMethod_g6d9c3c97524114496fd8b7f70af92457} with the arg {\bf key} \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb} to force the input method to commit the preedit in advance. \index{m17nInputMethod@{m17nInputMethod}!minput\_\-get\_\-title\_\-icon@{minput\_\-get\_\-title\_\-icon}}
340\index{minput\_\-get\_\-title\_\-icon@{minput\_\-get\_\-title\_\-icon}!m17nInputMethod@{m17nInputMethod}}
341\subsubsection[minput\_\-get\_\-title\_\-icon]{\setlength{\rightskip}{0pt plus 5cm}{\bf MPlist}$\ast$ minput\_\-get\_\-title\_\-icon ({\bf MSymbol} {\em language}, \/  {\bf MSymbol} {\em name})}\label{group__m17nInputMethod_ga6ca1639d1d2cc56908cc6972d237f3a}
342
343
344Get title and icon filename of an input method.
345
346The \doxyref{minput\_\-get\_\-title\_\-icon()}{p.}{group__m17nInputMethod_ga6ca1639d1d2cc56908cc6972d237f3a} function returns a plist containing a title and icon filename (if any) of an input method specified by {\bf language} and {\bf name}.
347
348The first element of the plist has key \doxyref{Mtext}{p.}{group__m17nPlist_g1a22859374071a0ca66f12452afee8bd} and the value is an M-text of the title for identifying the input method. The second element (if any) has key \doxyref{Mtext}{p.}{group__m17nPlist_g1a22859374071a0ca66f12452afee8bd} and the value is an M-text of the icon image (absolute) filename for the same purpose.
349
350\begin{Desc}
351\item[Return value:]If there exists a specified input method and it defines an title, a plist is returned. Otherwise, NULL is returned. The caller must free the plist by \doxyref{m17n\_\-object\_\-unref()}{p.}{group__m17nObject_g248ba287a615a2cf3cdb99c13275453b}. \end{Desc}
352\index{m17nInputMethod@{m17nInputMethod}!minput\_\-get\_\-description@{minput\_\-get\_\-description}}
353\index{minput\_\-get\_\-description@{minput\_\-get\_\-description}!m17nInputMethod@{m17nInputMethod}}
354\subsubsection[minput\_\-get\_\-description]{\setlength{\rightskip}{0pt plus 5cm}{\bf MText}$\ast$ minput\_\-get\_\-description ({\bf MSymbol} {\em language}, \/  {\bf MSymbol} {\em name})}\label{group__m17nInputMethod_g4a80b81791850c2445992e6e4fd7fa1b}
355
356
357Get description text of an input method.
358
359The \doxyref{minput\_\-get\_\-description()}{p.}{group__m17nInputMethod_g4a80b81791850c2445992e6e4fd7fa1b} function returns an M-text that describes the input method specified by {\bf language} and {\bf name}.
360
361\begin{Desc}
362\item[Return value:]If the specified input method has a description text, a pointer to \doxyref{MText}{p.}{group__m17nMtext_ge8bba45315c15c8f79ec4a73ebc52aec} is returned. The caller has to free it by \doxyref{m17n\_\-object\_\-unref()}{p.}{group__m17nObject_g248ba287a615a2cf3cdb99c13275453b}. If the input method does not have a description text, {\tt NULL} is returned. \end{Desc}
363\index{m17nInputMethod@{m17nInputMethod}!minput\_\-get\_\-command@{minput\_\-get\_\-command}}
364\index{minput\_\-get\_\-command@{minput\_\-get\_\-command}!m17nInputMethod@{m17nInputMethod}}
365\subsubsection[minput\_\-get\_\-command]{\setlength{\rightskip}{0pt plus 5cm}{\bf MPlist}$\ast$ minput\_\-get\_\-command ({\bf MSymbol} {\em language}, \/  {\bf MSymbol} {\em name}, \/  {\bf MSymbol} {\em command})}\label{group__m17nInputMethod_g4472e21e6a1e65056f5815c3ce36e41b}
366
367
368Get information about input method command(s).
369
370The \doxyref{minput\_\-get\_\-command()}{p.}{group__m17nInputMethod_g4472e21e6a1e65056f5815c3ce36e41b} function returns information about the command {\bf command} of the input method specified by {\bf language} and {\bf name}. An input method command is a pseudo key event to which one or more actual input key sequences are assigned.
371
372There are two kinds of commands, global and local. A global command has a global definition, and the description and the key assignment may be inherited by a local command. Each input method defines a local command which has a local key assignment. It may also declare a local command that inherits the definition of a global command of the same name.
373
374If {\bf language} is \doxyref{Mt}{p.}{group__m17nSymbol_g8769a573efbb023b4d77f9d03babc09f} and {\bf name} is \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb}, this function returns information about a global command. Otherwise information about a local command is returned.
375
376If {\bf command} is \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb}, information about all commands is returned.
377
378The return value is a {\em well-formed\/} plist (\doxyref{Property List}{p.}{group__m17nPlist}) of this format:
379
380\footnotesize\begin{verbatim}
381  ((NAME DESCRIPTION STATUS [KEYSEQ ...]) ...)
382\end{verbatim}
383\normalsize
384 {\tt NAME} is a symbol representing the command name.
385
386{\tt DESCRIPTION} is an M-text describing the command, or \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb} if the command has no description.
387
388{\tt STATUS} is a symbol representing how the key assignment is decided. The value is \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb} (the default key assignment), {\bf Mcustomized} (the key assignment is customized by per-user customization file), or {\bf Mconfigured} (the key assignment is set by the call of \doxyref{minput\_\-config\_\-command()}{p.}{group__m17nInputMethod_ga5de29f63f6eb770059c2f55ce8237ed}). For a local command only, it may also be {\bf Minherited} (the key assignment is inherited from the corresponding global command).
389
390{\tt KEYSEQ} is a plist of one or more symbols representing a key sequence assigned to the command. If there's no KEYSEQ, the command is currently disabled (i.e. no key sequence can trigger actions of the command).
391
392If {\bf command} is not \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb}, the first element of the returned plist contains the information about {\bf command}.
393
394\begin{Desc}
395\item[Return value:]\end{Desc}
396If the requested information was found, a pointer to a non-empty plist is returned. As the plist is kept in the library, the caller must not modify nor free it.
397
398Otherwise (the specified input method or the specified command does not exist), {\tt NULL} is returned.
399
400\begin{Desc}
401\item[Example:]
402
403\begin{Code}\begin{verbatim}MText *
404get_im_command_description (MSymbol language, MSymbol name, MSymbol command)
405{
406  /* Return a description of the command COMMAND of the input method
407     specified by LANGUAGE and NAME.  */
408  MPlist *cmd = minput_get_command (langauge, name, command);
409  MPlist *plist;
410
411  if (! cmds)
412    return NULL;
413  plist = mplist_value (cmds);  /* (NAME DESCRIPTION STATUS KEY-SEQ ...) */
414  plist = mplist_next (plist);  /* (DESCRIPTION STATUS KEY-SEQ ...) */
415  return  (mplist_key (plist) == Mtext
416           ? (MText *) mplist_value (plist)
417           : NULL);
418}
419\end{verbatim}
420\end{Code}
421
422 \end{Desc}
423\index{m17nInputMethod@{m17nInputMethod}!minput\_\-config\_\-command@{minput\_\-config\_\-command}}
424\index{minput\_\-config\_\-command@{minput\_\-config\_\-command}!m17nInputMethod@{m17nInputMethod}}
425\subsubsection[minput\_\-config\_\-command]{\setlength{\rightskip}{0pt plus 5cm}int minput\_\-config\_\-command ({\bf MSymbol} {\em language}, \/  {\bf MSymbol} {\em name}, \/  {\bf MSymbol} {\em command}, \/  {\bf MPlist} $\ast$ {\em keyseqlist})}\label{group__m17nInputMethod_ga5de29f63f6eb770059c2f55ce8237ed}
426
427
428Configure the key sequence of an input method command.
429
430The \doxyref{minput\_\-config\_\-command()}{p.}{group__m17nInputMethod_ga5de29f63f6eb770059c2f55ce8237ed} function assigns a list of key sequences {\bf keyseqlist} to the command {\bf command} of the input method specified by {\bf language} and {\bf name}.
431
432If {\bf keyseqlist} is a non-empty plist, it must be a list of key sequences, and each key sequence must be a plist of symbols.
433
434If {\bf keyseqlist} is an empty plist, any configuration and customization of the command are cancelled, and default key sequences become effective.
435
436If {\bf keyseqlist} is NULL, the configuration of the command is canceled, and the original key sequences (what saved in per-user customization file, or the default one) become effective.
437
438In the latter two cases, {\bf command} can be \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb} to make all the commands of the input method the target of the operation.
439
440If {\bf name} is \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb}, this function configures the key assignment of a global command, not that of a specific input method.
441
442The configuration takes effect for input methods opened or re-opened later in the current session. In order to make the configuration take effect for the future session, it must be saved in a per-user customization file by the function \doxyref{minput\_\-save\_\-config()}{p.}{group__m17nInputMethod_g08b59a97ca5194abfb04dc4cc96919d6}.
443
444\begin{Desc}
445\item[Return value:]If the operation was successful, this function returns 0, otherwise returns -1. The operation fails in these cases: \begin{itemize}
446\item {\bf keyseqlist} is not in a valid form. \item {\bf command} is not available for the input method. \item {\bf language} and {\bf name} do not specify an existing input method. \end{itemize}
447\end{Desc}
448\begin{Desc}
449\item[See Also:]\doxyref{minput\_\-get\_\-commands()}{p.}{group__m17nInputMethod_g63f6d2d105b01b7721f732b2433ea78e}, \doxyref{minput\_\-save\_\-config()}{p.}{group__m17nInputMethod_g08b59a97ca5194abfb04dc4cc96919d6}.\end{Desc}
450\begin{Desc}
451\item[Example:]
452
453\begin{Code}\begin{verbatim}/* Add "C-x u" to the "start" command of Unicode input method.  */
454{
455  MSymbol start_command = msymbol ("start");
456  MSymbol unicode = msymbol ("unicode");
457  MPlist *cmd, *plist, *key_seq_list, *key_seq;
458
459  /* At first get the current key-sequence assignment.  */
460  cmd = minput_get_command (Mt, unicode, start_command);
461  if (! cmd)
462    {
463      /* The input method does not have the command "start".  Here
464         should come some error handling code.  */
465    }
466  /* Now CMD == ((start DESCRIPTION STATUS KEY-SEQUENCE ...) ...).
467     Extract the part (KEY-SEQUENCE ...).  */
468  plist = mplist_next (mplist_next (mplist_next (mplist_value (cmd))));
469  /* Copy it because we should not modify it directly.  */
470  key_seq_list = mplist_copy (plist);
471
472  key_seq = mplist();
473  mplist_add (key_seq, Msymbol, msymbol ("C-x"));
474  mplist_add (key_seq, Msymbol, msymbol ("u"));
475  mplist_add (key_seq_list, Mplist, key_seq);
476  m17n_object_unref (key_seq);
477
478  minput_config_command (Mt, unicode, start_command, key_seq_list);
479  m17n_object_unref (key_seq_list);
480}
481\end{verbatim}
482\end{Code}
483
484 \end{Desc}
485\index{m17nInputMethod@{m17nInputMethod}!minput\_\-get\_\-variable@{minput\_\-get\_\-variable}}
486\index{minput\_\-get\_\-variable@{minput\_\-get\_\-variable}!m17nInputMethod@{m17nInputMethod}}
487\subsubsection[minput\_\-get\_\-variable]{\setlength{\rightskip}{0pt plus 5cm}{\bf MPlist}$\ast$ minput\_\-get\_\-variable ({\bf MSymbol} {\em language}, \/  {\bf MSymbol} {\em name}, \/  {\bf MSymbol} {\em variable})}\label{group__m17nInputMethod_g09c8aea172323731cd3e946b3ef43a50}
488
489
490Get information about input method variable(s).
491
492The \doxyref{minput\_\-get\_\-variable()}{p.}{group__m17nInputMethod_g09c8aea172323731cd3e946b3ef43a50} function returns information about variable {\bf variable} of the input method specified by {\bf language} and {\bf name}. An input method variable controls behavior of an input method.
493
494There are two kinds of variables, global and local. A global variable has a global definition, and the description and the value may be inherited by a local variable. Each input method defines a local variable which has local value. It may also declare a local variable that inherits definition of a global variable of the same name.
495
496If {\bf language} is \doxyref{Mt}{p.}{group__m17nSymbol_g8769a573efbb023b4d77f9d03babc09f} and {\bf name} is \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb}, information about a global variable is returned. Otherwise information about a local variable is returned.
497
498If {\bf variable} is \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb}, information about all variables is returned.
499
500The return value is a {\em well-formed\/} plist (\doxyref{Property List}{p.}{group__m17nPlist}) of this format:
501
502\footnotesize\begin{verbatim}
503  ((NAME DESCRIPTION STATUS VALUE [VALID-VALUE ...]) ...)
504\end{verbatim}
505\normalsize
506 {\tt NAME} is a symbol representing the variable name.
507
508{\tt DESCRIPTION} is an M-text describing the variable, or \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb} if the variable has no description.
509
510{\tt STATUS} is a symbol representing how the value is decided. The value is \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb} (the default value), {\bf Mcustomized} (the value is customized by per-user customization file), or {\bf Mconfigured} (the value is set by the call of \doxyref{minput\_\-config\_\-variable()}{p.}{group__m17nInputMethod_g15f7939874de15330d3d9aa0c450e424}). For a local variable only, it may also be {\bf Minherited} (the value is inherited from the corresponding global variable).
511
512{\tt VALUE} is the initial value of the variable. If the key of this element is \doxyref{Mt}{p.}{group__m17nSymbol_g8769a573efbb023b4d77f9d03babc09f}, the variable has no initial value. Otherwise, the key is \doxyref{Minteger}{p.}{group__m17nPlist_g0ce08eb57aa339db4d4745e75e80fdd8}, \doxyref{Msymbol}{p.}{group__m17nSymbol_g6592d4eb3c46fe7fb8993c252b8fedeb}, or \doxyref{Mtext}{p.}{group__m17nPlist_g1a22859374071a0ca66f12452afee8bd} and the value is of the corresponding type.
513
514{\tt VALID-VALUEs} (if any) specify which values the variable can have. They have the same type (i.e. having the same key) as {\tt VALUE} except for the case that VALUE is an integer. In that case, {\tt VALID-VALUE} may be a plist of two integers specifying the range of possible values.
515
516If there no {\tt VALID-VALUE}, the variable can have any value as long as the type is the same as {\tt VALUE}.
517
518If {\bf variable} is not \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb}, the first element of the returned plist contains the information about {\bf variable}.
519
520\begin{Desc}
521\item[Return value:]\end{Desc}
522If the requested information was found, a pointer to a non-empty plist is returned. As the plist is kept in the library, the caller must not modify nor free it.
523
524Otherwise (the specified input method or the specified variable does not exist), {\tt NULL} is returned. \index{m17nInputMethod@{m17nInputMethod}!minput\_\-config\_\-variable@{minput\_\-config\_\-variable}}
525\index{minput\_\-config\_\-variable@{minput\_\-config\_\-variable}!m17nInputMethod@{m17nInputMethod}}
526\subsubsection[minput\_\-config\_\-variable]{\setlength{\rightskip}{0pt plus 5cm}int minput\_\-config\_\-variable ({\bf MSymbol} {\em language}, \/  {\bf MSymbol} {\em name}, \/  {\bf MSymbol} {\em variable}, \/  {\bf MPlist} $\ast$ {\em value})}\label{group__m17nInputMethod_g15f7939874de15330d3d9aa0c450e424}
527
528
529Configure the value of an input method variable.
530
531The \doxyref{minput\_\-config\_\-variable()}{p.}{group__m17nInputMethod_g15f7939874de15330d3d9aa0c450e424} function assigns {\bf value} to the variable {\bf variable} of the input method specified by {\bf language} and {\bf name}.
532
533If {\bf value} is a non-empty plist, it must be a plist of one element whose key is \doxyref{Minteger}{p.}{group__m17nPlist_g0ce08eb57aa339db4d4745e75e80fdd8}, \doxyref{Msymbol}{p.}{group__m17nSymbol_g6592d4eb3c46fe7fb8993c252b8fedeb}, or \doxyref{Mtext}{p.}{group__m17nPlist_g1a22859374071a0ca66f12452afee8bd}, and the value is of the corresponding type. That value is assigned to the variable.
534
535If {\bf value} is an empty plist, any configuration and customization of the variable are canceled, and the default value is assigned to the variable.
536
537If {\bf value} is NULL, the configuration of the variable is canceled, and the original value (what saved in per-user customization file, or the default value) is assigned to the variable.
538
539In the latter two cases, {\bf variable} can be \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb} to make all the variables of the input method the target of the operation.
540
541If {\bf name} is \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb}, this function configures the value of global variable, not that of a specific input method.
542
543The configuration takes effect for input methods opened or re-opened later in the current session. To make the configuration take effect for the future session, it must be saved in a per-user customization file by the function \doxyref{minput\_\-save\_\-config()}{p.}{group__m17nInputMethod_g08b59a97ca5194abfb04dc4cc96919d6}.
544
545\begin{Desc}
546\item[Return value:]\end{Desc}
547If the operation was successful, this function returns 0, otherwise returns -1. The operation fails in these cases: \begin{itemize}
548\item {\bf value} is not in a valid form, the type does not match the definition, or the value is our of range. \item {\bf variable} is not available for the input method. \item {\bf language} and {\bf name} do not specify an existing input method. \end{itemize}
549
550
551\begin{Desc}
552\item[See Also:]\doxyref{minput\_\-get\_\-variable()}{p.}{group__m17nInputMethod_g09c8aea172323731cd3e946b3ef43a50}, \doxyref{minput\_\-save\_\-config()}{p.}{group__m17nInputMethod_g08b59a97ca5194abfb04dc4cc96919d6}. \end{Desc}
553\index{m17nInputMethod@{m17nInputMethod}!minput\_\-config\_\-file@{minput\_\-config\_\-file}}
554\index{minput\_\-config\_\-file@{minput\_\-config\_\-file}!m17nInputMethod@{m17nInputMethod}}
555\subsubsection[minput\_\-config\_\-file]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ minput\_\-config\_\-file (void)}\label{group__m17nInputMethod_g5bf6821ca0d9bb5a738aba60225e247d}
556
557
558Get the name of per-user customization file.
559
560The \doxyref{minput\_\-config\_\-file()}{p.}{group__m17nInputMethod_g5bf6821ca0d9bb5a738aba60225e247d} function returns the absolute path name of per-user customization file into which \doxyref{minput\_\-save\_\-config()}{p.}{group__m17nInputMethod_g08b59a97ca5194abfb04dc4cc96919d6} save configurations. It is usually {\tt config.mic} under the directory {\tt \$\{HOME\}/.m17n.d} (\$\{HOME\} is user's home directory). It is not assured that the file of the returned name exists nor is readable/writable. If \doxyref{minput\_\-save\_\-config()}{p.}{group__m17nInputMethod_g08b59a97ca5194abfb04dc4cc96919d6} fails and returns -1, an application program might check the file, make it writable (if possible), and try \doxyref{minput\_\-save\_\-config()}{p.}{group__m17nInputMethod_g08b59a97ca5194abfb04dc4cc96919d6} again.
561
562\begin{Desc}
563\item[Return value:]\end{Desc}
564This function returns a string. As the string is kept in the library, the caller must not modify nor free it.
565
566\begin{Desc}
567\item[See Also:]\doxyref{minput\_\-save\_\-config()}{p.}{group__m17nInputMethod_g08b59a97ca5194abfb04dc4cc96919d6} \end{Desc}
568\index{m17nInputMethod@{m17nInputMethod}!minput\_\-save\_\-config@{minput\_\-save\_\-config}}
569\index{minput\_\-save\_\-config@{minput\_\-save\_\-config}!m17nInputMethod@{m17nInputMethod}}
570\subsubsection[minput\_\-save\_\-config]{\setlength{\rightskip}{0pt plus 5cm}int minput\_\-save\_\-config (void)}\label{group__m17nInputMethod_g08b59a97ca5194abfb04dc4cc96919d6}
571
572
573Save configurations in per-user customization file.
574
575The \doxyref{minput\_\-save\_\-config()}{p.}{group__m17nInputMethod_g08b59a97ca5194abfb04dc4cc96919d6} function saves the configurations done so far in the current session into the per-user customization file.
576
577\begin{Desc}
578\item[Return value:]\end{Desc}
579If the operation was successful, 1 is returned. If the per-user customization file is currently locked, 0 is returned. In that case, the caller may wait for a while and try again. If the configuration file is not writable, -1 is returned. In that case, the caller may check the name of the file by calling \doxyref{minput\_\-config\_\-file()}{p.}{group__m17nInputMethod_g5bf6821ca0d9bb5a738aba60225e247d}, make it writable if possible, and try again.
580
581\begin{Desc}
582\item[See Also:]\doxyref{minput\_\-config\_\-file()}{p.}{group__m17nInputMethod_g5bf6821ca0d9bb5a738aba60225e247d} \end{Desc}
583\index{m17nInputMethod@{m17nInputMethod}!minput\_\-get\_\-variables@{minput\_\-get\_\-variables}}
584\index{minput\_\-get\_\-variables@{minput\_\-get\_\-variables}!m17nInputMethod@{m17nInputMethod}}
585\subsubsection[minput\_\-get\_\-variables]{\setlength{\rightskip}{0pt plus 5cm}{\bf MPlist}$\ast$ minput\_\-get\_\-variables ({\bf MSymbol} {\em language}, \/  {\bf MSymbol} {\em name})}\label{group__m17nInputMethod_gb6d3ebaf43705f994aebb990feada7aa}
586
587
588Get a list of variables of an input method (obsolete).
589
590This function is obsolete. Use \doxyref{minput\_\-get\_\-variable()}{p.}{group__m17nInputMethod_g09c8aea172323731cd3e946b3ef43a50} instead.
591
592The \doxyref{minput\_\-get\_\-variables()}{p.}{group__m17nInputMethod_gb6d3ebaf43705f994aebb990feada7aa} function returns a plist (\doxyref{MPlist}{p.}{group__m17nPlist_gc8b2ac3c9a8f0a6afb7f189b694035e2}) of variables used to control the behavior of the input method specified by {\bf language} and {\bf name}. The plist is {\em well-formed\/} (\doxyref{Property List}{p.}{group__m17nPlist}) of the following format:
593
594
595
596\footnotesize\begin{verbatim}
597    (VARNAME (DOC-MTEXT DEFAULT-VALUE [ VALUE ... ] )
598     VARNAME (DOC-MTEXT DEFAULT-VALUE [ VALUE ... ] )
599     ...)
600\end{verbatim}
601\normalsize
602
603
604{\tt VARNAME} is a symbol representing the variable name.
605
606{\tt DOC-MTEXT} is an M-text describing the variable.
607
608{\tt DEFAULT-VALUE} is the default value of the variable. It is a symbol, integer, or M-text.
609
610{\tt VALUEs} (if any) specifies the possible values of the variable. If {\tt DEFAULT-VALUE} is an integer, {\tt VALUE} may be a plist ({\tt FROM} {\tt TO}), where {\tt FROM} and {\tt TO} specifies a range of possible values.
611
612For instance, suppose an input method has the variables:
613
614\begin{itemize}
615\item name:intvar, description:\char`\"{}value is an integer\char`\"{}, initial value:0, value-range:0..3,10,20\end{itemize}
616\begin{itemize}
617\item name:symvar, description:\char`\"{}value is a symbol\char`\"{}, initial value:nil, value-range:a, b, c, nil\end{itemize}
618\begin{itemize}
619\item name:txtvar, description:\char`\"{}value is an M-text\char`\"{}, initial value:empty text, no value-range (i.e. any text)\end{itemize}
620Then, the returned plist is as follows.
621
622
623
624\footnotesize\begin{verbatim}
625    (intvar ("value is an integer" 0 (0 3) 10 20)
626     symvar ("value is a symbol" nil a b c nil)
627     txtvar ("value is an M-text" ""))
628\end{verbatim}
629\normalsize
630
631
632\begin{Desc}
633\item[Return value:]If the input method uses any variables, a pointer to \doxyref{MPlist}{p.}{group__m17nPlist_gc8b2ac3c9a8f0a6afb7f189b694035e2} is returned. As the plist is kept in the library, the caller must not modify nor free it. If the input method does not use any variable, {\tt NULL} is returned. \end{Desc}
634\index{m17nInputMethod@{m17nInputMethod}!minput\_\-set\_\-variable@{minput\_\-set\_\-variable}}
635\index{minput\_\-set\_\-variable@{minput\_\-set\_\-variable}!m17nInputMethod@{m17nInputMethod}}
636\subsubsection[minput\_\-set\_\-variable]{\setlength{\rightskip}{0pt plus 5cm}int minput\_\-set\_\-variable ({\bf MSymbol} {\em language}, \/  {\bf MSymbol} {\em name}, \/  {\bf MSymbol} {\em variable}, \/  void $\ast$ {\em value})}\label{group__m17nInputMethod_gec5679f07f92df8aba39e49fc90341bd}
637
638
639Set the initial value of an input method variable.
640
641The \doxyref{minput\_\-set\_\-variable()}{p.}{group__m17nInputMethod_gec5679f07f92df8aba39e49fc90341bd} function sets the initial value of input method variable {\bf variable} to {\bf value} for the input method specified by {\bf language} and {\bf name}.
642
643By default, the initial value is 0.
644
645This setting gets effective in a newly opened input method.
646
647\begin{Desc}
648\item[Return value:]If the operation was successful, 0 is returned. Otherwise -1 is returned, and \doxyref{merror\_\-code}{p.}{group__m17nError_g995a2e373cfd6a8e5eaca8686b5b0a73} is set to {\tt MERROR\_\-IM}. \end{Desc}
649\index{m17nInputMethod@{m17nInputMethod}!minput\_\-get\_\-commands@{minput\_\-get\_\-commands}}
650\index{minput\_\-get\_\-commands@{minput\_\-get\_\-commands}!m17nInputMethod@{m17nInputMethod}}
651\subsubsection[minput\_\-get\_\-commands]{\setlength{\rightskip}{0pt plus 5cm}{\bf MPlist}$\ast$ minput\_\-get\_\-commands ({\bf MSymbol} {\em language}, \/  {\bf MSymbol} {\em name})}\label{group__m17nInputMethod_g63f6d2d105b01b7721f732b2433ea78e}
652
653
654Get information about input method commands.
655
656The \doxyref{minput\_\-get\_\-commands()}{p.}{group__m17nInputMethod_g63f6d2d105b01b7721f732b2433ea78e} function returns information about input method commands of the input method specified by {\bf language} and {\bf name}. An input method command is a pseudo key event to which one or more actual input key sequences are assigned.
657
658There are two kinds of commands, global and local. Global commands are used by multiple input methods for the same purpose, and have global key assignments. Local commands are used only by a specific input method, and have only local key assignments.
659
660Each input method may locally change key assignments for global commands. The global key assignment for a global command is effective only when the current input method does not have local key assignments for that command.
661
662If {\bf name} is \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb}, information about global commands is returned. In this case {\bf language} is ignored.
663
664If {\bf name} is not \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb}, information about those commands that have local key assignments in the input method specified by {\bf language} and {\bf name} is returned.
665
666\begin{Desc}
667\item[Return value:]If no input method commands are found, this function returns {\tt NULL}.\end{Desc}
668Otherwise, a pointer to a plist is returned. The key of each element in the plist is a symbol representing a command, and the value is a plist of the form COMMAND-INFO described below.
669
670The first element of COMMAND-INFO has the key \doxyref{Mtext}{p.}{group__m17nPlist_g1a22859374071a0ca66f12452afee8bd}, and the value is an M-text describing the command.
671
672If there are no more elements, that means no key sequences are assigned to the command. Otherwise, each of the remaining elements has the key \doxyref{Mplist}{p.}{group__m17nPlist_g933000e154873f9bfcaa56d976bd259b}, and the value is a plist whose keys are \doxyref{Msymbol}{p.}{group__m17nSymbol_g6592d4eb3c46fe7fb8993c252b8fedeb} and values are symbols representing input keys, which are currently assigned to the command.
673
674As the returned plist is kept in the library, the caller must not modify nor free it. \index{m17nInputMethod@{m17nInputMethod}!minput\_\-assign\_\-command\_\-keys@{minput\_\-assign\_\-command\_\-keys}}
675\index{minput\_\-assign\_\-command\_\-keys@{minput\_\-assign\_\-command\_\-keys}!m17nInputMethod@{m17nInputMethod}}
676\subsubsection[minput\_\-assign\_\-command\_\-keys]{\setlength{\rightskip}{0pt plus 5cm}int minput\_\-assign\_\-command\_\-keys ({\bf MSymbol} {\em language}, \/  {\bf MSymbol} {\em name}, \/  {\bf MSymbol} {\em command}, \/  {\bf MPlist} $\ast$ {\em keyseq})}\label{group__m17nInputMethod_g617c6a8028c05381f4f8a0ec781f1855}
677
678
679Assign a key sequence to an input method command (obsolete).
680
681This function is obsolete. Use \doxyref{minput\_\-config\_\-command()}{p.}{group__m17nInputMethod_ga5de29f63f6eb770059c2f55ce8237ed} instead.
682
683The \doxyref{minput\_\-assign\_\-command\_\-keys()}{p.}{group__m17nInputMethod_g617c6a8028c05381f4f8a0ec781f1855} function assigns input key sequence {\bf keyseq} to input method command {\bf command} for the input method specified by {\bf language} and {\bf name}. If {\bf name} is \doxyref{Mnil}{p.}{group__m17nSymbol_g0346fc05efcccc8f11271b51c0fe3eeb}, the key sequence is assigned globally no matter what {\bf language} is. Otherwise the key sequence is assigned locally.
684
685Each element of {\bf keyseq} must have the key {\bf msymbol} and the value must be a symbol representing an input key.
686
687{\bf keyseq} may be {\tt NULL}, in which case, all assignments are deleted globally or locally.
688
689This assignment gets effective in a newly opened input method.
690
691\begin{Desc}
692\item[Return value:]If the operation was successful, 0 is returned. Otherwise -1 is returned, and \doxyref{merror\_\-code}{p.}{group__m17nError_g995a2e373cfd6a8e5eaca8686b5b0a73} is set to {\tt MERROR\_\-IM}. \end{Desc}
693\index{m17nInputMethod@{m17nInputMethod}!minput\_\-callback@{minput\_\-callback}}
694\index{minput\_\-callback@{minput\_\-callback}!m17nInputMethod@{m17nInputMethod}}
695\subsubsection[minput\_\-callback]{\setlength{\rightskip}{0pt plus 5cm}int minput\_\-callback ({\bf MInputContext} $\ast$ {\em ic}, \/  {\bf MSymbol} {\em command})}\label{group__m17nInputMethod_g955cd9e0b9fd8cf426aed3f3584337ff}
696
697
698Call a callback function.
699
700The \doxyref{minput\_\-callback()}{p.}{group__m17nInputMethod_g955cd9e0b9fd8cf426aed3f3584337ff} functions calls a callback function {\bf command} assigned for the input context {\bf ic}. The caller must set specific elements in {\bf ic-$>$plist} if the callback function requires.
701
702\begin{Desc}
703\item[Return value:]If there exists a specified callback function, 0 is returned. Otherwise -1 is returned. By side effects, {\bf ic-$>$plist} may be modified. \end{Desc}
704
705
706\subsection{Variable Documentation}
707\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-method@{Minput\_\-method}}
708\index{Minput\_\-method@{Minput\_\-method}!m17nInputMethod@{m17nInputMethod}}
709\subsubsection[Minput\_\-method]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-method}}\label{group__m17nInputMethod_g4f2d5dc3e6c637d18e2ecf24edfff456}
710
711
712Symbol whose name is \char`\"{}input-method\char`\"{}.
713
714\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-preedit\_\-start@{Minput\_\-preedit\_\-start}}
715\index{Minput\_\-preedit\_\-start@{Minput\_\-preedit\_\-start}!m17nInputMethod@{m17nInputMethod}}
716\subsubsection[Minput\_\-preedit\_\-start]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-preedit\_\-start}}\label{group__m17nInputMethod_g5516535b28981c4b02b33368f3d56d56}
717
718
719\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-preedit\_\-done@{Minput\_\-preedit\_\-done}}
720\index{Minput\_\-preedit\_\-done@{Minput\_\-preedit\_\-done}!m17nInputMethod@{m17nInputMethod}}
721\subsubsection[Minput\_\-preedit\_\-done]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-preedit\_\-done}}\label{group__m17nInputMethod_g3f96ecb6d7f7f82bc1ba5e47f8da0b92}
722
723
724\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-preedit\_\-draw@{Minput\_\-preedit\_\-draw}}
725\index{Minput\_\-preedit\_\-draw@{Minput\_\-preedit\_\-draw}!m17nInputMethod@{m17nInputMethod}}
726\subsubsection[Minput\_\-preedit\_\-draw]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-preedit\_\-draw}}\label{group__m17nInputMethod_gcb0619c67c071d453dd2920ffc26d0ed}
727
728
729\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-status\_\-start@{Minput\_\-status\_\-start}}
730\index{Minput\_\-status\_\-start@{Minput\_\-status\_\-start}!m17nInputMethod@{m17nInputMethod}}
731\subsubsection[Minput\_\-status\_\-start]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-status\_\-start}}\label{group__m17nInputMethod_gd3739f8097f1c52f10a8581828b7bb95}
732
733
734\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-status\_\-done@{Minput\_\-status\_\-done}}
735\index{Minput\_\-status\_\-done@{Minput\_\-status\_\-done}!m17nInputMethod@{m17nInputMethod}}
736\subsubsection[Minput\_\-status\_\-done]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-status\_\-done}}\label{group__m17nInputMethod_g49febb92bb4320bc27f20043517f3169}
737
738
739\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-status\_\-draw@{Minput\_\-status\_\-draw}}
740\index{Minput\_\-status\_\-draw@{Minput\_\-status\_\-draw}!m17nInputMethod@{m17nInputMethod}}
741\subsubsection[Minput\_\-status\_\-draw]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-status\_\-draw}}\label{group__m17nInputMethod_ge75d45c1dbe0483768e9364af4d282f9}
742
743
744\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-candidates\_\-start@{Minput\_\-candidates\_\-start}}
745\index{Minput\_\-candidates\_\-start@{Minput\_\-candidates\_\-start}!m17nInputMethod@{m17nInputMethod}}
746\subsubsection[Minput\_\-candidates\_\-start]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-candidates\_\-start}}\label{group__m17nInputMethod_g6bb355b1b5521571056b96a854f3c6c8}
747
748
749\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-candidates\_\-done@{Minput\_\-candidates\_\-done}}
750\index{Minput\_\-candidates\_\-done@{Minput\_\-candidates\_\-done}!m17nInputMethod@{m17nInputMethod}}
751\subsubsection[Minput\_\-candidates\_\-done]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-candidates\_\-done}}\label{group__m17nInputMethod_g6ff3deabad4489cef99fff428b2628e2}
752
753
754\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-candidates\_\-draw@{Minput\_\-candidates\_\-draw}}
755\index{Minput\_\-candidates\_\-draw@{Minput\_\-candidates\_\-draw}!m17nInputMethod@{m17nInputMethod}}
756\subsubsection[Minput\_\-candidates\_\-draw]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-candidates\_\-draw}}\label{group__m17nInputMethod_g6bf782d7824557ec10e3988f6fcf4834}
757
758
759\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-set\_\-spot@{Minput\_\-set\_\-spot}}
760\index{Minput\_\-set\_\-spot@{Minput\_\-set\_\-spot}!m17nInputMethod@{m17nInputMethod}}
761\subsubsection[Minput\_\-set\_\-spot]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-set\_\-spot}}\label{group__m17nInputMethod_gf19d77434bb1a12bdcb50f46448f1402}
762
763
764\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-toggle@{Minput\_\-toggle}}
765\index{Minput\_\-toggle@{Minput\_\-toggle}!m17nInputMethod@{m17nInputMethod}}
766\subsubsection[Minput\_\-toggle]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-toggle}}\label{group__m17nInputMethod_gfa306a028998a972bf3a05c8609fe65e}
767
768
769\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-reset@{Minput\_\-reset}}
770\index{Minput\_\-reset@{Minput\_\-reset}!m17nInputMethod@{m17nInputMethod}}
771\subsubsection[Minput\_\-reset]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-reset}}\label{group__m17nInputMethod_g5f07520efe1e533af2b2322fca2bc9a2}
772
773
774\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-get\_\-surrounding\_\-text@{Minput\_\-get\_\-surrounding\_\-text}}
775\index{Minput\_\-get\_\-surrounding\_\-text@{Minput\_\-get\_\-surrounding\_\-text}!m17nInputMethod@{m17nInputMethod}}
776\subsubsection[Minput\_\-get\_\-surrounding\_\-text]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-get\_\-surrounding\_\-text}}\label{group__m17nInputMethod_g1ca3d6e04f44fada82ed3c81069be23c}
777
778
779\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-delete\_\-surrounding\_\-text@{Minput\_\-delete\_\-surrounding\_\-text}}
780\index{Minput\_\-delete\_\-surrounding\_\-text@{Minput\_\-delete\_\-surrounding\_\-text}!m17nInputMethod@{m17nInputMethod}}
781\subsubsection[Minput\_\-delete\_\-surrounding\_\-text]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-delete\_\-surrounding\_\-text}}\label{group__m17nInputMethod_gb1bfef46ab8e9daa6f3cf53b912b7da8}
782
783
784\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-focus\_\-out@{Minput\_\-focus\_\-out}}
785\index{Minput\_\-focus\_\-out@{Minput\_\-focus\_\-out}!m17nInputMethod@{m17nInputMethod}}
786\subsubsection[Minput\_\-focus\_\-out]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-focus\_\-out}}\label{group__m17nInputMethod_g3edb37986f3bcdd15d73884c0d9b239b}
787
788
789\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-focus\_\-in@{Minput\_\-focus\_\-in}}
790\index{Minput\_\-focus\_\-in@{Minput\_\-focus\_\-in}!m17nInputMethod@{m17nInputMethod}}
791\subsubsection[Minput\_\-focus\_\-in]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-focus\_\-in}}\label{group__m17nInputMethod_g0d721c64e73c1e362f3cc44716b6c6ab}
792
793
794\index{m17nInputMethod@{m17nInputMethod}!Minput\_\-focus\_\-move@{Minput\_\-focus\_\-move}}
795\index{Minput\_\-focus\_\-move@{Minput\_\-focus\_\-move}!m17nInputMethod@{m17nInputMethod}}
796\subsubsection[Minput\_\-focus\_\-move]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-focus\_\-move}}\label{group__m17nInputMethod_g2b2dd61bcb633e89865ebeda1cd9f466}
797
798
799\index{m17nInputMethod@{m17nInputMethod}!Minherited@{Minherited}}
800\index{Minherited@{Minherited}!m17nInputMethod@{m17nInputMethod}}
801\subsubsection[Minherited]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minherited}}\label{group__m17nInputMethod_gf84d56e3015c4b26802debcbd9352806}
802
803
804These are the predefined symbols describing status of input method command and variable, and are used in a return value of \doxyref{minput\_\-get\_\-command()}{p.}{group__m17nInputMethod_g4472e21e6a1e65056f5815c3ce36e41b} and \doxyref{minput\_\-get\_\-variable()}{p.}{group__m17nInputMethod_g09c8aea172323731cd3e946b3ef43a50}. \index{m17nInputMethod@{m17nInputMethod}!Mcustomized@{Mcustomized}}
805\index{Mcustomized@{Mcustomized}!m17nInputMethod@{m17nInputMethod}}
806\subsubsection[Mcustomized]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Mcustomized}}\label{group__m17nInputMethod_g07679cd0d5bf8e137d5dc554a30aa106}
807
808
809\index{m17nInputMethod@{m17nInputMethod}!Mconfigured@{Mconfigured}}
810\index{Mconfigured@{Mconfigured}!m17nInputMethod@{m17nInputMethod}}
811\subsubsection[Mconfigured]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Mconfigured}}\label{group__m17nInputMethod_ge01597fe66dfef937b4c5c47e54abbd0}
812
813
814\index{m17nInputMethod@{m17nInputMethod}!minput\_\-default\_\-driver@{minput\_\-default\_\-driver}}
815\index{minput\_\-default\_\-driver@{minput\_\-default\_\-driver}!m17nInputMethod@{m17nInputMethod}}
816\subsubsection[minput\_\-default\_\-driver]{\setlength{\rightskip}{0pt plus 5cm}{\bf MInputDriver} {\bf minput\_\-default\_\-driver}}\label{group__m17nInputMethod_gdb0ff8e5e616a810ed27113b17ad363b}
817
818
819The default driver for internal input methods.
820
821The variable \doxyref{minput\_\-default\_\-driver}{p.}{group__m17nInputMethod_gdb0ff8e5e616a810ed27113b17ad363b} is the default driver for internal input methods.
822
823The member \doxyref{MInputDriver::open\_\-im()}{p.}{structMInputDriver_6de5d7d05acec89bf7e41b2f234082f7} searches the m17n database for an input method that matches the tag $<$ \doxyref{Minput\_\-method}{p.}{group__m17nInputMethod_g4f2d5dc3e6c637d18e2ecf24edfff456}, {\bf language}, {\bf name$>$} and loads it.
824
825The member \doxyref{MInputDriver::callback\_\-list()}{p.}{structMInputDriver_159fe7401cd0913dc8c480a18efeff64} is {\tt NULL}. Thus, it is programmers responsibility to set it to a plist of proper callback functions. Otherwise, no feedback information (e.g. preedit text) can be shown to users.
826
827The macro \doxyref{M17N\_\-INIT()}{p.}{group__m17nIntro_g66879b35a1fee08b3e5966f6650c39f9} sets the variable \doxyref{minput\_\-driver}{p.}{group__m17nInputMethod_g0e4d7a69ac0861d4b9b58990a0f03702} to the pointer to this driver so that all internal input methods use it.
828
829Therefore, unless {\tt minput\_\-driver} is set differently, the driver dependent arguments {\bf arg} of the functions whose name begins with \char`\"{}minput\_\-\char`\"{} are all ignored. \index{m17nInputMethod@{m17nInputMethod}!minput\_\-driver@{minput\_\-driver}}
830\index{minput\_\-driver@{minput\_\-driver}!m17nInputMethod@{m17nInputMethod}}
831\subsubsection[minput\_\-driver]{\setlength{\rightskip}{0pt plus 5cm}{\bf MInputDriver}$\ast$ {\bf minput\_\-driver}}\label{group__m17nInputMethod_g0e4d7a69ac0861d4b9b58990a0f03702}
832
833
834The driver for internal input methods.
835
836The variable \doxyref{minput\_\-driver}{p.}{group__m17nInputMethod_g0e4d7a69ac0861d4b9b58990a0f03702} is a pointer to the input method driver that is used by internal input methods. The macro \doxyref{M17N\_\-INIT()}{p.}{group__m17nIntro_g66879b35a1fee08b3e5966f6650c39f9} initializes it to a pointer to \doxyref{minput\_\-default\_\-driver}{p.}{group__m17nInputMethod_gdb0ff8e5e616a810ed27113b17ad363b} if $<$m17n{\em \/}.h$>$ is included. \index{m17nInputMethod@{m17nInputMethod}!Minput\_\-driver@{Minput\_\-driver}}
837\index{Minput\_\-driver@{Minput\_\-driver}!m17nInputMethod@{m17nInputMethod}}
838\subsubsection[Minput\_\-driver]{\setlength{\rightskip}{0pt plus 5cm}{\bf MSymbol} {\bf Minput\_\-driver}}\label{group__m17nInputMethod_gf03ec92f0d20d9bff8b9031461270d41}
839
840
841The variable \doxyref{Minput\_\-driver}{p.}{group__m17nInputMethod_gf03ec92f0d20d9bff8b9031461270d41} is a symbol for a foreign input method. See \doxyref{foreign input method}{p.}{group__m17nInputMethod_foreign-input-method} for the detail.