Added documentation on termkey_{get,set}_flags()

This commit is contained in:
Paul LeoNerd Evans 2008-11-10 22:29:21 +00:00
parent 397a7fb683
commit 781c2160c3
2 changed files with 27 additions and 1 deletions

View File

@ -36,9 +36,12 @@ Ignore locale settings; force UTF-8 recombining on. This flag overrides \fBTERMK
Even if the terminal file descriptor \fIfd\fP represents a
.SM TTY
device, do not call the \fBtcsetattr\fP() \fBtermios\fP function on it to set it to canonical input mode.
.PP
When the constructor is invoked, it attempts to detect if the current locale is UTF-8 aware or not, and sets either the \fBTERMKEY_FLAG_UTF8\fP or \fBTERMKEY_FLAG_RAW\fP flag. One of these two bits will always be in effect. The current flags in effect can be obtained by \fBtermkey_get_flags\fP().
.SH "RETURN VALUE"
If successful, \fBtermkey_new\fP() returns a pointer to the new instance. On failure, \fBNULL\fP is returned. \fBtermkey_destroy\fP() returns no value.
.SH "SEE ALSO"
.BR termkey_waitkey (3),
.BR termkey_advisereadable (3),
.BR termkey_getkey (3)
.BR termkey_getkey (3),
.BR termkey_get_flags (3)

23
termkey_set_flags.3 Normal file
View File

@ -0,0 +1,23 @@
.TH TERMKEY_SET_FLAGS 3
.SH NAME
termkey_set_flags, termkey_get_flags \- control the operational flags
.SH SYNOPSIS
.nf
.B #include <termkey.h>
.sp
.BI "void termkey_set_flags(termkey_t *" tk ", int " newflags );
.br
.BI "int termkey_get_flags(termkey_t *" tk );
.fi
.sp
Link with \fI-ltermkey\fP.
.SH DESCRIPTION
\fBtermkey_set_flags\fP changes the set of operation flags in the termkey instance to those given by \fInewflags\fP.
.PP
\fBtermkey_get_flags\fP returns the value set by the last call to \fBtermkey_set_flags\fP(), or the value given to the constructor.
.PP
When the constructor is invoked, it attempts to detect if the current locale is UTF-8 aware or not, and sets either the \fBTERMKEY_FLAG_UTF8\fP or \fBTERMKEY_FLAG_RAW\fP flag. One of these two bits will always be returned by \fBtermkey_get_flags\fP().
.SH "RETURN VALUE"
\fBtermkey_set_flags\fP() returns no value. \fBtermkey_get_flags\fP() returns the current operational flags.
.SH "SEE ALSO"
.BR termkey_new (3),