fish-shell/input_common.h
axel 29c488c6dc Fixes to api documentation, added .PHONY to makefile actions, made a few private functions static
darcs-hash:20060123204014-ac50b-b9d2a10c7f00945b5d9d244cb3b8c1489fe280de.gz
2006-01-24 06:40:14 +10:00

56 lines
1.3 KiB
C

/** \file input_common.h
Header file for the low level input library
*/
#ifndef INPUT_COMMON_H
#define INPUT_COMMON_H
#include <wchar.h>
/**
Use unencoded private-use keycodes for internal characters
*/
#define INPUT_COMMON_RESERVED 0xe000
enum
{
/**
R_NULL is sometimes returned by the input when a character was
requested but none could be delivered, or when an exception
happened.
*/
R_NULL = INPUT_COMMON_RESERVED
}
;
/**
Init the library
*/
void input_common_init( int (*ih)() );
/**
Free memory used by the library
*/
void input_common_destroy();
/**
Function used by input_readch to read bytes from stdin until enough
bytes have been read to convert them to a wchar_t. Conversion is
done using mbrtowc. If a character has previously been read and
then 'unread' using \c input_common_unreadch, that character is
returned. If timed is true, readch2 will wait at most
WAIT_ON_ESCAPE milliseconds for a character to be available for
reading before returning with the value WEOF.
*/
wchar_t input_common_readch( int timed );
/**
Push a character or a readline function onto the stack of unread
characters that input_readch will return before actually reading from fd
0.
*/
void input_common_unreadch( wint_t ch );
#endif