1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
9<title>KPRPutChar</title>
10</head>
11
12<body>
13
14<h1>KPRPutChar</h1>
15
16<h2>C Specification</h2>
17
18<dl>
19<dd><pre><code>#include &lt;revolution/kpr.h&gt;</code></pre>
20  </dd>
21<dd><pre>u8 KPRPutChar(KPRQueue *queue, wchar_t inChar);</pre>
22  </dd>
23</dl>
24
25<h2>Arguments</h2>
26
27<TABLE border="1" cellpadding="3" cellspacing="0.1">
28<tr>
29<TD width="120" bgcolor="#ffffe8"><code><em><strong><STRONG><EM><CODE>queue</CODE></EM></STRONG></strong></em></code></TD>
30<TD width="520">Pointer to a queue to add character to.</TD>
31</tr>
32<tr>
33<TD width="120" bgcolor="#ffffe8"><code><em><strong>inChar</strong></em></code></TD>
34<TD width="520">UTF-16 Character to be added to queue.</TD>
35</tr>
36</TABLE>
37
38<h2>Return Values</h2>
39
40<TABLE border="1" cellpadding="3" cellspacing="0.1">
41<tr>
42<TD width="120" bgcolor="#ffffe8"><code><em><strong>u8</strong></em></code></TD>
43<TD width="520">The number (count) of processed characters available for output.
44</TD>
45</tr>
46</TABLE>
47
48<h2>Description</h2>
49
50<p>This function inserts a character into the given processing queue. Characters are processed as they are inserted.</p>
51<p>Characters should be entered into the appropriate queue as they are generated by the keyboard. Immediately after entering the character in the queue, the application should try to get the processed characters from the queue. The application should try to remove characters in a loop, since one input may generate multiple outputs. An output of 0 indicates that the queue is empty.</p>
52<p>It is an application error to add characters to a queue and not try to remove them immediately afterwards. The queue is not designed to hold more characters than can be processed at once. Overflowing the queue will result in a fatal error.</p>
53<p>In order to support Alt+keypad keys, the private Unicode values KBK_Keypad_0 through KBK_Keypad_9 are placed in a queue whenever the Alt key is pressed while Num Lock is active and the keys 0-9 on the keypad are entered. In order to generate output when the Alt key is released, the value <code>KPR_FLUSH_AKP_CHAR</code> should be entered into the queue. This value itself is absorbed by the queue and does not become available for output.</p>
54<p>This function may also be used to flush all the unprocessed characters in the queue (and make them available for output). To do so, the value <code>KPR_FLUSH_ALL_CHAR</code> should be entered into the queue. This value itself is absorbed by the queue and does not become available for output.</p>
55
56<h2>See Also</h2>
57
58<p><a href="list.html">Key Processing Functions</a>, <a href="KPRGetChar.html"><code>KPRGetChar</code></a>
59</p>
60
61<H2>Revision History</H2>
62<P>2007/07/09 Initial version.</P>
63
64</BODY>
65</HTML>