Added termkey_get_fd() to API
This commit is contained in:
parent
8737046c4d
commit
f75bdf1516
|
@ -283,6 +283,11 @@ void termkey_destroy(termkey_t *tk)
|
|||
termkey_free(tk);
|
||||
}
|
||||
|
||||
int termkey_get_fd(termkey_t *tk)
|
||||
{
|
||||
return tk->fd;
|
||||
}
|
||||
|
||||
int termkey_get_flags(termkey_t *tk)
|
||||
{
|
||||
return tk->flags;
|
||||
|
|
|
@ -137,6 +137,8 @@ termkey_t *termkey_new(int fd, int flags);
|
|||
void termkey_free(termkey_t *tk);
|
||||
void termkey_destroy(termkey_t *tk);
|
||||
|
||||
int termkey_get_fd(termkey_t *tk);
|
||||
|
||||
int termkey_get_flags(termkey_t *tk);
|
||||
void termkey_set_flags(termkey_t *tk, int newflags);
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
.TH TERMKEY_GET_FD 3
|
||||
.SH NAME
|
||||
termkey_get_fd \- obtain the file descriptor for the terminal
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <termkey.h>
|
||||
.sp
|
||||
.BI "void termkey_get_fd(termkey_t *" tk );
|
||||
.fi
|
||||
.sp
|
||||
Link with \fI-ltermkey\fP.
|
||||
.SH DESCRIPTION
|
||||
\fBtermkey_get_fd\fP returns the file descriptor that was passed as the \fIfd\fP argument to \fBtermkey_new\fP(3).
|
||||
.SH "RETURN VALUE"
|
||||
\fBtermkey_get_fd\fP() returns the current file descriptor.
|
||||
.SH "SEE ALSO"
|
||||
.BR termkey_new (3),
|
||||
.BR termkey_get_flags (3)
|
|
@ -48,4 +48,5 @@ If successful, \fBtermkey_new\fP() returns a pointer to the new instance. On fai
|
|||
.BR termkey_waitkey (3),
|
||||
.BR termkey_advisereadable (3),
|
||||
.BR termkey_getkey (3),
|
||||
.BR termkey_get_flags (3)
|
||||
.BR termkey_get_flags (3),
|
||||
.BR termkey_get_fd (3)
|
||||
|
|
Loading…
Reference in New Issue