File: structMInputDriver.html

package info (click to toggle)
m17n-docs 1.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 53,736 kB
  • sloc: javascript: 7,609; sh: 1,256; makefile: 351; ansic: 206
file content (263 lines) | stat: -rw-r--r-- 17,788 bytes parent folder | download
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>The m17n Library: MInputDriver Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">The m17n Library
   &#160;<span id="projectnumber">1.8.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">MInputDriver Struct Reference<div class="ingroups"><a class="el" href="group__m17nShell.html">SHELL API</a> &raquo; <a class="el" href="group__m17nInputMethod.html">Input Method (basic)</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Structure of input method driver.  
 <a href="structMInputDriver.html#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for MInputDriver:</div>
<div class="dyncontent">
<div class="center"><img src="structMInputDriver__coll__graph.png" border="0" usemap="#aMInputDriver_coll__map" alt="Collaboration graph"/></div>
<map name="aMInputDriver_coll__map" id="aMInputDriver_coll__map">
<area shape="rect" title="Structure of input method driver." alt="" coords="25,273,132,300"/>
<area shape="rect" href="structMPlist.html" title="Type of property list objects." alt="" coords="47,184,110,211"/>
<area shape="rect" href="structM17NObject.html" title=" " alt="" coords="27,95,130,121"/>
<area shape="rect" href="structM17NObjectRecord.html" title=" " alt="" coords="5,5,152,32"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:adab132de1505f5945e55f5a4f00805e4"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#adab132de1505f5945e55f5a4f00805e4">open_im</a> )(<a class="el" href="structMInputMethod.html">MInputMethod</a> *im)</td></tr>
<tr class="memdesc:adab132de1505f5945e55f5a4f00805e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open an input method.  <a href="structMInputDriver.html#adab132de1505f5945e55f5a4f00805e4">More...</a><br /></td></tr>
<tr class="separator:adab132de1505f5945e55f5a4f00805e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5e036c2a68303cab231ab662c651e8b"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#ad5e036c2a68303cab231ab662c651e8b">close_im</a> )(<a class="el" href="structMInputMethod.html">MInputMethod</a> *im)</td></tr>
<tr class="memdesc:ad5e036c2a68303cab231ab662c651e8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close an input method.  <a href="structMInputDriver.html#ad5e036c2a68303cab231ab662c651e8b">More...</a><br /></td></tr>
<tr class="separator:ad5e036c2a68303cab231ab662c651e8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4018bd823b931cc6c21b924b16172d39"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#a4018bd823b931cc6c21b924b16172d39">create_ic</a> )(<a class="el" href="structMInputContext.html">MInputContext</a> *ic)</td></tr>
<tr class="memdesc:a4018bd823b931cc6c21b924b16172d39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an input context.  <a href="structMInputDriver.html#a4018bd823b931cc6c21b924b16172d39">More...</a><br /></td></tr>
<tr class="separator:a4018bd823b931cc6c21b924b16172d39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabc5c1567fca0592184861fa49f533a1"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#aabc5c1567fca0592184861fa49f533a1">destroy_ic</a> )(<a class="el" href="structMInputContext.html">MInputContext</a> *ic)</td></tr>
<tr class="memdesc:aabc5c1567fca0592184861fa49f533a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy an input context.  <a href="structMInputDriver.html#aabc5c1567fca0592184861fa49f533a1">More...</a><br /></td></tr>
<tr class="separator:aabc5c1567fca0592184861fa49f533a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e6e5570633e7ad26598a5fa9bdc1487"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#a7e6e5570633e7ad26598a5fa9bdc1487">filter</a> )(<a class="el" href="structMInputContext.html">MInputContext</a> *ic, MSymbol key, void *arg)</td></tr>
<tr class="memdesc:a7e6e5570633e7ad26598a5fa9bdc1487"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filter an input key.  <a href="structMInputDriver.html#a7e6e5570633e7ad26598a5fa9bdc1487">More...</a><br /></td></tr>
<tr class="separator:a7e6e5570633e7ad26598a5fa9bdc1487"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf5fa6a15099d9d4f6888046ad634bb4"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#acf5fa6a15099d9d4f6888046ad634bb4">lookup</a> )(<a class="el" href="structMInputContext.html">MInputContext</a> *ic, MSymbol key, void *arg, <a class="el" href="structMText.html">MText</a> *mt)</td></tr>
<tr class="memdesc:acf5fa6a15099d9d4f6888046ad634bb4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lookup a produced text in an input context.  <a href="structMInputDriver.html#acf5fa6a15099d9d4f6888046ad634bb4">More...</a><br /></td></tr>
<tr class="separator:acf5fa6a15099d9d4f6888046ad634bb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a159fe7401cd0913dc8c480a18efeff64"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structMPlist.html">MPlist</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#a159fe7401cd0913dc8c480a18efeff64">callback_list</a></td></tr>
<tr class="memdesc:a159fe7401cd0913dc8c480a18efeff64"><td class="mdescLeft">&#160;</td><td class="mdescRight">List of callback functions.  <a href="structMInputDriver.html#a159fe7401cd0913dc8c480a18efeff64">More...</a><br /></td></tr>
<tr class="separator:a159fe7401cd0913dc8c480a18efeff64"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Structure of input method driver. </p>
<p>The type <code><a class="el" href="structMInputDriver.html" title="Structure of input method driver.">MInputDriver</a></code> is the structure of an input method driver that contains several functions to handle an input method. <br  />
 </p>
</div><h2 class="groupheader">Field Documentation</h2>
<a id="adab132de1505f5945e55f5a4f00805e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adab132de1505f5945e55f5a4f00805e4">&#9670;&nbsp;</a></span>open_im</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* MInputDriver::open_im) (<a class="el" href="structMInputMethod.html">MInputMethod</a> *im)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Open an input method. </p>
<p>This function opens the input method <b>im</b>. It is called from the function <a class="el" href="group__m17nInputMethod.html#ga34d3e527bfd705d2b7f2b749199c1e11" title="Open an input method.">minput_open_im()</a> after all member of <b>im</b> but &lt;info&gt; set. If opening <b>im</b> succeeds, it returns 0. Otherwise, it returns -1. The function can setup <b>im-&gt;info</b> to keep various information that is referred by the other driver functions. <br  />
 </p>

</div>
</div>
<a id="ad5e036c2a68303cab231ab662c651e8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5e036c2a68303cab231ab662c651e8b">&#9670;&nbsp;</a></span>close_im</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* MInputDriver::close_im) (<a class="el" href="structMInputMethod.html">MInputMethod</a> *im)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Close an input method. </p>
<p>This function closes the input method <b>im</b>. It is called from the function <a class="el" href="group__m17nInputMethod.html#ga373b415d157c2507f4ca4a864836e905" title="Close an input method.">minput_close_im()</a>. It frees all memory allocated for <b>im-&gt;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. <br  />
 </p>

</div>
</div>
<a id="a4018bd823b931cc6c21b924b16172d39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4018bd823b931cc6c21b924b16172d39">&#9670;&nbsp;</a></span>create_ic</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* MInputDriver::create_ic) (<a class="el" href="structMInputContext.html">MInputContext</a> *ic)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create an input context. </p>
<p>This function creates the input context <b>ic</b>. It is called from the function <a class="el" href="group__m17nInputMethod.html#ga8b32df84c645f73ed65e20a1d51c1859" title="Create an input context.">minput_create_ic()</a> after all members of <b>ic</b> but &lt;info&gt; are set. If creating <b>ic</b> succeeds, it returns 0. Otherwise, it returns -1. The function can setup <b>ic-&gt;info</b> to keep various information that is referred by the other driver functions. <br  />
 </p>

</div>
</div>
<a id="aabc5c1567fca0592184861fa49f533a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aabc5c1567fca0592184861fa49f533a1">&#9670;&nbsp;</a></span>destroy_ic</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* MInputDriver::destroy_ic) (<a class="el" href="structMInputContext.html">MInputContext</a> *ic)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroy an input context. </p>
<p>This function is called from the function <a class="el" href="group__m17nInputMethod.html#ga80e4b330fb112883f2183d54b4e9c5bb" title="Destroy an input context.">minput_destroy_ic()</a> and destroys the input context <b>ic</b>. It frees all memory allocated for <b>ic-&gt;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. <br  />
 </p>

</div>
</div>
<a id="a7e6e5570633e7ad26598a5fa9bdc1487"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e6e5570633e7ad26598a5fa9bdc1487">&#9670;&nbsp;</a></span>filter</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* MInputDriver::filter) (<a class="el" href="structMInputContext.html">MInputContext</a> *ic, MSymbol key, void *arg)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Filter an input key. </p>
<p>This function is called from the function <a class="el" href="group__m17nInputMethod.html#ga6d9c3c97524114496fd8b7f70af92457" title="Filter an input key.">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#ga6d9c3c97524114496fd8b7f70af92457" title="Filter an input key.">minput_filter()</a>.</p>
<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>
<p>It may update <b>ic-&gt;status</b>, <b>ic-&gt;preedit</b>, <b>ic-&gt;cursor_pos</b>, <b>ic-&gt;ncandidates</b>, <b>ic-&gt;candidates</b>, and <b>ic-&gt;produced</b> if that is necessary for the member &lt;callback&gt;.</p>
<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. <br  />
 </p>

</div>
</div>
<a id="acf5fa6a15099d9d4f6888046ad634bb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf5fa6a15099d9d4f6888046ad634bb4">&#9670;&nbsp;</a></span>lookup</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* MInputDriver::lookup) (<a class="el" href="structMInputContext.html">MInputContext</a> *ic, MSymbol key, void *arg, <a class="el" href="structMText.html">MText</a> *mt)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Lookup a produced text in an input context. </p>
<p>It is called from the function <a class="el" href="group__m17nInputMethod.html#gafe533480c705b877189938a0eecb1b57" title="Look up a text produced in the input context.">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>
<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. <br  />
 </p>

</div>
</div>
<a id="a159fe7401cd0913dc8c480a18efeff64"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a159fe7401cd0913dc8c480a18efeff64">&#9670;&nbsp;</a></span>callback_list</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structMPlist.html">MPlist</a>* MInputDriver::callback_list</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>List of callback functions. </p>
<p>List of callback functions. Keys are one of <b>Minput_preedit_start</b>, <b>Minput_preedit_draw</b>, <b>Minput_preedit_done</b>, <b>Minput_status_start</b>, <b>Minput_status_draw</b>, <b>Minput_status_done</b>, <b>Minput_candidates_start</b>, <b>Minput_candidates_draw</b>, <b>Minput_candidates_done</b>, <b>Minput_set_spot</b>, <b>Minput_toggle</b>, <b>Minput_reset</b>, <b>Minput_get_surrounding_text</b>, <b>Minput_delete_surrounding_text</b>. Values are functions of type <a class="el" href="group__m17nInputMethod.html#ga2b9c7eab6cc379f1b21935640797dc83" title="Type of input method callback functions.">MInputCallbackFunc</a>. <br  />
 </p>

</div>
</div>
</div><!-- contents -->
<hr>
<ADDRESS>
<a href="http://www.m17n.org/m17n-lib-en/index.html" target="mulewindow"><img src="parrot.png" align=bottom alt="m17n-lib Home" border=0></a>
</ADDRESS>
</body>
</HTML>
<!-- Copyright information
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".
-->