#include <revolution/kpr.h> u8 KPRPutChar(KPRQueue *queue, wchar_t inChar);
queue |
Pointer to a queue to add character to. |
|---|---|
| inChar | UTF-16 Character to be added to queue |
Returns the number of processed characters available for output.
This function inserts a character into the given processing queue. Characters are processed as they are inserted.
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.
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.
In order to support Alt+keypad keys, dedicated Unicode values KBK_Keypad_0 through KBK_Keypad_9 are placed in the queue whenever the Alt key is pressed while Num Lock is active and one of the keys 0-9 on the keypad is being pressed. In order to generate output when the Alt key is released, the value KPR_FLUSH_AKP_CHAR should be entered into the queue. This value itself is absorbed by the queue and does not become available for output.
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 KPR_FLUSH_ALL_CHAR should be entered into the queue. This value itself is absorbed by the queue and does not become available for output.
Key Processing Functions, KPRGetChar
2007/07/09 Initial version.
CONFIDENTIAL