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
|
<!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>MInputDriver Struct Reference<br>
<small>
[<a class="el" href="group__m17nInputMethod.html">Input Method (basic)</a>]</small>
</h1>Structure of input method driver.
<a href="#_details">More...</a>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#o0">open_im</a> )(<a class="el" href="structMInputMethod.html">MInputMethod</a> *im)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Open an input method. <a href="#o0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#o1">close_im</a> )(<a class="el" href="structMInputMethod.html">MInputMethod</a> *im)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Close an input method. <a href="#o1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#o2">create_ic</a> )(<a class="el" href="structMInputContext.html">MInputContext</a> *ic)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create an input context. <a href="#o2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#o3">destroy_ic</a> )(<a class="el" href="structMInputContext.html">MInputContext</a> *ic)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy an input context. <a href="#o3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#o4">filter</a> )(<a class="el" href="structMInputContext.html">MInputContext</a> *ic, <a class="el" href="group__m17nSymbol.html#ga0">MSymbol</a> key, void *arg)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Filter an input key. <a href="#o4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#o5">lookup</a> )(<a class="el" href="structMInputContext.html">MInputContext</a> *ic, <a class="el" href="group__m17nSymbol.html#ga0">MSymbol</a> key, void *arg, <a class="el" href="group__m17nMtext.html#ga0">MText</a> *mt)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Lookup a produced text in an input context. <a href="#o5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__m17nPlist.html#ga0">MPlist</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#o6">callback_list</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">List of callback functions. <a href="#o6"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The type <code>MInputDriver</code> is the structure of an input method driver that contains several functions to handle an input method.
<p>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="o0" doxytag="MInputDriver::open_im"></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">int(* <a class="el" href="structMInputDriver.html#o0">MInputDriver::open_im</a>)(<a class="el" href="structMInputMethod.html">MInputMethod</a> *im) </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
This function opens the input method <b>im</b>. It is called from the function <a class="el" href="group__m17nInputMethod.html#ga34">minput_open_im()</a> after all member of <b>im</b> but <info> set. If opening <b>im</b> succeeds, it returns 0. Otherwise, it returns -1. The function can setup <b>im->info</b> to keep various information that is referred by the other driver functions. </td>
</tr>
</table>
<a class="anchor" name="o1" doxytag="MInputDriver::close_im"></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">void(* <a class="el" href="structMInputDriver.html#o1">MInputDriver::close_im</a>)(<a class="el" href="structMInputMethod.html">MInputMethod</a> *im) </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
This function closes the input method <b>im</b>. It is called from the function <a class="el" href="group__m17nInputMethod.html#ga35">minput_close_im()</a>. It frees all memory allocated for <b>im->info</b> (if any) after finishing all the tasks of closing the input method. But, the other members of <b>im</b> should not be touched. </td>
</tr>
</table>
<a class="anchor" name="o2" doxytag="MInputDriver::create_ic"></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">int(* <a class="el" href="structMInputDriver.html#o2">MInputDriver::create_ic</a>)(<a class="el" href="structMInputContext.html">MInputContext</a> *ic) </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
This function creates the input context <b>ic</b>. It is called from the function <a class="el" href="group__m17nInputMethod.html#ga36">minput_create_ic()</a> after all members of <b>ic</b> but <info> are set. If creating <b>ic</b> succeeds, it returns 0. Otherwise, it returns -1. The function can setup <b>ic->info</b> to keep various information that is referred by the other driver functions. </td>
</tr>
</table>
<a class="anchor" name="o3" doxytag="MInputDriver::destroy_ic"></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">void(* <a class="el" href="structMInputDriver.html#o3">MInputDriver::destroy_ic</a>)(<a class="el" href="structMInputContext.html">MInputContext</a> *ic) </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
This function is called from the function <a class="el" href="group__m17nInputMethod.html#ga37">minput_destroy_ic()</a> and destroys the input context <b>ic</b>. It frees all memory allocated for <b>ic->info</b> (if any) after finishing all the tasks of destroying the input method. But, the other members of <b>ic</b> should not be touched. </td>
</tr>
</table>
<a class="anchor" name="o4" doxytag="MInputDriver::filter"></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">int(* <a class="el" href="structMInputDriver.html#o4">MInputDriver::filter</a>)(<a class="el" href="structMInputContext.html">MInputContext</a> *ic, <a class="el" href="group__m17nSymbol.html#ga0">MSymbol</a> key, void *arg) </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
This function is called from the function <a class="el" href="group__m17nInputMethod.html#ga38">minput_filter()</a> and filters an input key. <b>key</b> and <b>arg</b> are the same as what given to <a class="el" href="group__m17nInputMethod.html#ga38">minput_filter()</a>.<p>
The task of the function is to handle <b>key</b>, update the internal state of <b>ic</b>. If <b>key</b> is absorbed by the input method and no text is produced, it returns 1. Otherwise, it returns 0.<p>
It may update <b>ic->status</b>, <b>ic->preedit</b>, <b>ic->cursor_pos</b>, <b>ic->ncandidates</b>, <b>ic->candidates</b>, and <b>ic->produced</b> if that is necessary for the member <callback>.<p>
The meaning of <b>arg</b> depends on the input method river. See the documentation of <code>minput_default_driver</code> and <code>minput_gui_driver</code> for instance. </td>
</tr>
</table>
<a class="anchor" name="o5" doxytag="MInputDriver::lookup"></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">int(* <a class="el" href="structMInputDriver.html#o5">MInputDriver::lookup</a>)(<a class="el" href="structMInputContext.html">MInputContext</a> *ic, <a class="el" href="group__m17nSymbol.html#ga0">MSymbol</a> key, void *arg, <a class="el" href="group__m17nMtext.html#ga0">MText</a> *mt) </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
It is called from the function <a class="el" href="group__m17nInputMethod.html#ga39">minput_lookup()</a> and looks up a produced text in the input context <b>ic</b>. This function concatenate a text produced by the input key <b>key</b> (if any) to M-text <b>mt</b>. If <b>key</b> was correctly handled by the input method of <b>ic</b>, it returns 0. Otherwise, it returns 1.<p>
The meaning of <b>arg</b> depends on the input method driver. See the documentation of <code>minput_default_driver</code> and <code>minput_gui_driver</code> for instance. </td>
</tr>
</table>
<a class="anchor" name="o6" doxytag="MInputDriver::callback_list"></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"><a class="el" href="group__m17nPlist.html#ga0">MPlist</a>* <a class="el" href="structMInputDriver.html#o6">MInputDriver::callback_list</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
List of callback functions. Keys are one of <a class="el" href="group__m17nInputMethod.html#ga19">Minput_preedit_start</a>, <a class="el" href="group__m17nInputMethod.html#ga21">Minput_preedit_draw</a>, <a class="el" href="group__m17nInputMethod.html#ga20">Minput_preedit_done</a>, <a class="el" href="group__m17nInputMethod.html#ga22">Minput_status_start</a>, <a class="el" href="group__m17nInputMethod.html#ga24">Minput_status_draw</a>, <a class="el" href="group__m17nInputMethod.html#ga23">Minput_status_done</a>, <a class="el" href="group__m17nInputMethod.html#ga25">Minput_candidates_start</a>, <a class="el" href="group__m17nInputMethod.html#ga27">Minput_candidates_draw</a>, <a class="el" href="group__m17nInputMethod.html#ga26">Minput_candidates_done</a>, <a class="el" href="group__m17nInputMethod.html#ga28">Minput_set_spot</a>, <a class="el" href="group__m17nInputMethod.html#ga29">Minput_toggle</a>, <a class="el" href="group__m17nInputMethod.html#ga30">Minput_reset</a>. Values are functions of type <a class="el" href="group__m17nInputMethod.html#ga2">MInputCallbackFunc</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".
-->
|