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
|
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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"/>
<title>The m17n Library: MInputDriver Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<img id="MSearchSelect" src="search/search.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</div>
</li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
<li><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>MInputDriver Struct Reference<br/>
<small>
[<a class="el" href="group__m17nInputMethod.html">Input Method (basic)</a>]</small>
</h1><!-- doxytag: class="MInputDriver" -->
<p>Structure of input method driver.
<a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#a6de5d7d05acec89bf7e41b2f234082f7">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="#a6de5d7d05acec89bf7e41b2f234082f7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#a6e9c0255e16e7a1039f0078c44a15fbb">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="#a6e9c0255e16e7a1039f0078c44a15fbb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#ab5a159c0f0b8920b088db43c7a4f0064">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="#ab5a159c0f0b8920b088db43c7a4f0064"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#ace8401115ecab3c6a859d49665e48bd4">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="#ace8401115ecab3c6a859d49665e48bd4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#a09e43f1c01e441351b7c0c5e16a129dc">filter</a> )(<a class="el" href="structMInputContext.html">MInputContext</a> *ic, <a class="el" href="group__m17nSymbol.html#ga0f53a95817f0b5c26442f8e12f89c16d">MSymbol</a> key, void *arg)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Filter an input key. <a href="#a09e43f1c01e441351b7c0c5e16a129dc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#a8b206e6ce988f1aeafac41efadf493af">lookup</a> )(<a class="el" href="structMInputContext.html">MInputContext</a> *ic, <a class="el" href="group__m17nSymbol.html#ga0f53a95817f0b5c26442f8e12f89c16d">MSymbol</a> key, void *arg, <a class="el" href="group__m17nMtext.html#gae8bba45315c15c8f79ec4a73ebc52aec">MText</a> *mt)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Lookup a produced text in an input context. <a href="#a8b206e6ce988f1aeafac41efadf493af"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__m17nPlist.html#gac8b2ac3c9a8f0a6afb7f189b694035e2">MPlist</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="structMInputDriver.html#a159fe7401cd0913dc8c480a18efeff64">callback_list</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">List of callback functions. <a href="#a159fe7401cd0913dc8c480a18efeff64"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<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. </p>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="a6de5d7d05acec89bf7e41b2f234082f7"></a><!-- doxytag: member="MInputDriver::open_im" ref="a6de5d7d05acec89bf7e41b2f234082f7" args=")(MInputMethod *im)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int(* <a class="el" href="structMInputDriver.html#a6de5d7d05acec89bf7e41b2f234082f7">MInputDriver::open_im</a>)(<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 <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. </p>
</div>
</div>
<a class="anchor" id="a6e9c0255e16e7a1039f0078c44a15fbb"></a><!-- doxytag: member="MInputDriver::close_im" ref="a6e9c0255e16e7a1039f0078c44a15fbb" args=")(MInputMethod *im)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void(* <a class="el" href="structMInputDriver.html#a6e9c0255e16e7a1039f0078c44a15fbb">MInputDriver::close_im</a>)(<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->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. </p>
</div>
</div>
<a class="anchor" id="ab5a159c0f0b8920b088db43c7a4f0064"></a><!-- doxytag: member="MInputDriver::create_ic" ref="ab5a159c0f0b8920b088db43c7a4f0064" args=")(MInputContext *ic)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int(* <a class="el" href="structMInputDriver.html#ab5a159c0f0b8920b088db43c7a4f0064">MInputDriver::create_ic</a>)(<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 <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. </p>
</div>
</div>
<a class="anchor" id="ace8401115ecab3c6a859d49665e48bd4"></a><!-- doxytag: member="MInputDriver::destroy_ic" ref="ace8401115ecab3c6a859d49665e48bd4" args=")(MInputContext *ic)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void(* <a class="el" href="structMInputDriver.html#ace8401115ecab3c6a859d49665e48bd4">MInputDriver::destroy_ic</a>)(<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->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. </p>
</div>
</div>
<a class="anchor" id="a09e43f1c01e441351b7c0c5e16a129dc"></a><!-- doxytag: member="MInputDriver::filter" ref="a09e43f1c01e441351b7c0c5e16a129dc" args=")(MInputContext *ic, MSymbol key, void *arg)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int(* <a class="el" href="structMInputDriver.html#a09e43f1c01e441351b7c0c5e16a129dc">MInputDriver::filter</a>)(<a class="el" href="structMInputContext.html">MInputContext</a> *ic, <a class="el" href="group__m17nSymbol.html#ga0f53a95817f0b5c26442f8e12f89c16d">MSymbol</a> 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->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>
<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. </p>
</div>
</div>
<a class="anchor" id="a8b206e6ce988f1aeafac41efadf493af"></a><!-- doxytag: member="MInputDriver::lookup" ref="a8b206e6ce988f1aeafac41efadf493af" args=")(MInputContext *ic, MSymbol key, void *arg, MText *mt)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int(* <a class="el" href="structMInputDriver.html#a8b206e6ce988f1aeafac41efadf493af">MInputDriver::lookup</a>)(<a class="el" href="structMInputContext.html">MInputContext</a> *ic, <a class="el" href="group__m17nSymbol.html#ga0f53a95817f0b5c26442f8e12f89c16d">MSymbol</a> key, void *arg, <a class="el" href="group__m17nMtext.html#gae8bba45315c15c8f79ec4a73ebc52aec">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. </p>
</div>
</div>
<a class="anchor" id="a159fe7401cd0913dc8c480a18efeff64"></a><!-- doxytag: member="MInputDriver::callback_list" ref="a159fe7401cd0913dc8c480a18efeff64" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__m17nPlist.html#gac8b2ac3c9a8f0a6afb7f189b694035e2">MPlist</a>* <a class="el" href="structMInputDriver.html#a159fe7401cd0913dc8c480a18efeff64">MInputDriver::callback_list</a></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#ga93a20c4a45f229e921bc4a3e1aa85312" title="Type of input method callback functions.">MInputCallbackFunc</a>. </p>
</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<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".
-->
|