aboutsummaryrefslogtreecommitdiff
path: root/termkey_new.3
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-06 00:02:41 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-06 00:02:41 +0000
commit388782b89be0bf8144ae3dc2a590b466c96d3d6d (patch)
treee8d41f72cc32be131ea088ef1b0dc60d740a2a37 /termkey_new.3
parent6adbb40f6eb112b4a34b7696301421ec7aa212bb (diff)
downloadtermo-388782b89be0bf8144ae3dc2a590b466c96d3d6d.tar.gz
termo-388782b89be0bf8144ae3dc2a590b466c96d3d6d.tar.xz
termo-388782b89be0bf8144ae3dc2a590b466c96d3d6d.zip
Added manpages for (most of) the external API functions
Diffstat (limited to 'termkey_new.3')
-rw-r--r--termkey_new.343
1 files changed, 43 insertions, 0 deletions
diff --git a/termkey_new.3 b/termkey_new.3
new file mode 100644
index 0000000..549be14
--- /dev/null
+++ b/termkey_new.3
@@ -0,0 +1,43 @@
+.TH TERMKEY_NEW 3
+.SH NAME
+termkey_new, termkey_free \- create or destroy new termkey instance
+.SH SYNOPSIS
+.nf
+.B #include <termkey.h>
+.sp
+.BI "termkey_tk *termkey_new(int " fd ", int " flags );
+.br
+.BI "void termkey_free(termkey_t *" tk );
+.fi
+.sp
+Link with \fI\-ltermkey\fP.
+.SH DESCRIPTION
+\fBtermkey_new\fP() creates a new termkey instance connected to the file handle opened by \fIfd\fP using the \fIflags\fP. The \fBtermkey_tk\fP structure should be considered opaque; its contents are not intended for use outside of the library.
+.PP
+\fBtermkey_free\fP() destroys the given instance and releases any resources controlled by it. It will not close the underlying filehandle given as the \fIfd\fP argument to \fBtermkey_new\fP().
+.PP
+The following values may be given as the \fIflags\fP bitmask:
+.TP
+.B TERMKEY_FLAG_NOINTERPRET
+Do not attempt to interpret \fBC0\fP codes into keysyms. Instead report them as plain "Ctrl-letter" events.
+.TP
+.B TERMKEY_FLAG_CONVERTKP
+Convert xterm's alternative keypad symbols into the plain
+.SM ASCII
+codes they would represent.
+.TP
+.B TERMKEY_FLAG_RAW
+Ignore locale settings; do not attempt to recombine UTF-8 sequences. Instead report only raw values.
+.TP
+.B TERMKEY_FLAG_UTF8
+Ignore locale settings; force UTF-8 recombining on. This flag overrides \fBTERMKEY_FLAG_RAW\fP.
+.TP
+.B TERMKEY_FLAG_NOTERMIOS
+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.
+.SH "RETURN VALUE"
+If successful, \fBtermkey_new\fP() returns a pointer to the new instance. On failure, \fBNULL\fP is returned. \fBtermkey_free\fP() returns no value.
+.SH "SEE ALSO"
+.BR termkey_waitkey (3),
+.BR termkey_getkey (3)