KPRLookAhead

Syntax

#include <revolution/kpr.h>

u8 KPRLookAhead(KPRQueue *queue, wchar_t *string, u32 maxSize);

Arguments

queue Pointer to a queue to retrieve characters from.
string Pointer to a wchar_t value to receive characters from queue
maxSize Indicates the maximum number of wchar_t values that string can hold.

Return Values

Returns the number of characters in a queue.

Description

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.

The area pointed to by string should be big enough to hold a KPR_MAX_QUEUE_LEN number of wchar_t values.

If string == NULL or if maxSize == 0, then the function only returns the number of characters that are available to be copied.

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, so they are retrieved as individual characters. With Romaji conversion, there may be up to 4 unprocessed characters in the queue.

This function does not dequeue the characters that are retrieved; it just gets a copy.

See Also

Key Processing Functions, KPRGetChar

Revision History

2007/07/09 Initial version.


CONFIDENTIAL