#include <cafe/kpr.h>

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


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

Return Values

The number (count) of characters available in the queue.


Use this function 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 KPR_MAX_QUEUE_LEN 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, and cannot be 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.

Do Not Call From

Background Do not call this function from the background.
Callbacks Do not call this function from any callback function.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.

See Also


Revision History

2013/05/08 Automated cleanup pass.