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>KPRLookAhead</title>
10</head>
11
12<body>
13
14<h1>KPRLookAhead</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 KPRLookAhead(KPRQueue *queue, wchar_t *string, u32 maxSize);</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 retrieve characters from.</TD>
31</tr>
32<tr>
33<TD width="120" bgcolor="#ffffe8"><code><em><strong>string</strong></em></code></TD>
34<TD width="520">Pointer to a <code>wchar_t</code> string value to receive characters from queue.</TD>
35</tr>
36<tr>
37<TD width="120" bgcolor="#ffffe8"><code><em><strong>maxSize</strong></em></code></TD>
38<TD width="520">Indicates the maximum number of <code>wchar_t</code> values that <code>string</code> can hold.</TD>
39</tr>
40</TABLE>
41
42<h2>Return Values</h2>
43
44<TABLE border="1" cellpadding="3" cellspacing="0.1">
45<tr>
46<TD width="120" bgcolor="#ffffe8"><code><em><strong>u8</strong></em></code></TD>
47<TD width="520">The number (count) of characters available in the queue.
48</TD>
49</tr>
50</TABLE>
51
52<h2>Description</h2>
53
54<p>This function may be used to retrieve a copy of all the characters in a processing queue, including characters that have been entered but not yet processed.</p>
55<p>The area pointed to by <code>string</code> should be big enough to hold <code>KPR_MAX_QUEUE_LEN</code> <code>wchar_t</code> values.</p>
56<p>If <code>string == NULL</code> or if <code>maxSize == 0</code>, then the function only returns the number of characters that are available to be copied.</p>
57<p>With only dead-key processing enabled, there can be a maximum of one unprocessed character in the queue (a dead key or combining accent character). Alt+keypad keystrokes are not stored in the queue as characters, and thus cannot be retrieved as individual characters. With Romaji conversion, there may be up to 4 unprocessed characters in the queue.</p>
58<p>This function does not dequeue the characters that are retrieved; it just gets a copy.</p>
59
60<h2>See Also</h2>
61
62<p><a href="list.html">Key Processing Functions</a>, <a href="KPRGetChar.html"><code>KPRGetChar</code></a>
63</p>
64
65<H2>Revision History</H2>
66<P>2007/07/09 Initial version.</P>
67
68</BODY>
69</HTML>