diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2019-02-07 23:35:13 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2019-02-07 23:35:13 +0000 |
commit | 09a82bd551098f29af29813bdae513159f379a97 (patch) | |
tree | a749fbfcd1c5c280c87e14c3cabeda28290c4696 /man | |
parent | 321b6ee04119538f5b2b43750327983fbc3a90c6 (diff) |
Define a tickit_term_ctltype() to get the types of terminal control constants
Diffstat (limited to 'man')
-rw-r--r-- | man/also | 1 | ||||
-rw-r--r-- | man/tickit_term_ctlname.3 | 18 |
2 files changed, 18 insertions, 1 deletions
@@ -17,6 +17,7 @@ tickit_term_input_wait_tv.3 = tickit_term_input_wait_msec.3 tickit_term_await_started_tv.3 = tickit_term_await_started_msec.3 tickit_term_emit_mouse.3 = tickit_term_emit_key.3 tickit_term_lookup_ctl.3 = tickit_term_ctlname.3 +tickit_term_ctltype.3 = tickit_term_ctlname.3 tickit_term_resume.3 = tickit_term_pause.3 tickit_pen_new_attrs.3 = tickit_pen_new.3 diff --git a/man/tickit_term_ctlname.3 b/man/tickit_term_ctlname.3 index 799d0df..b5dc985 100644 --- a/man/tickit_term_ctlname.3 +++ b/man/tickit_term_ctlname.3 @@ -7,6 +7,8 @@ tickit_term_ctlname \- return the name of a terminal control .sp .BI "const char * tickit_term_ctlname(TickitTermCtl " ctl ); .BI "TickitTermCtl tickit_term_lookup_ctl(const char * " name ); +.sp +.BI "TickitCtlType tickit_term_ctltype(TickitTermCtl " ctl ); .EE .sp Link with \fI\-ltickit\fP. @@ -14,8 +16,22 @@ Link with \fI\-ltickit\fP. \fBtickit_term_ctlname\fP() returns the name of the given terminal control. These names are the lowercase strings given in \fBtickit_term\fP(7). .PP \fBtickit_term_lookup_ctl\fP() returns the control constant for a given name. If the name is not recognised then -1 is returned. +.PP +\fBtickit_term_ctltype\fP() returns the type of the given terminal control, as one of the following constants: +.in +.TP +.B TICKIT_CTLTYPE_BOOL +The value is an integer representing a simple boolean choice, where any nonzero value is true. Use \fPtickit_term_setctl_int\fP(3) and \fBtickit_term_getctl_int\fP(3). +.TP +.B TICKIT_CTLTYPE_INT +The value is an integer representing a quantity, or a value in some particular enumeration. Use \fPtickit_term_setctl_int\fP(3) and \fBtickit_term_getctl_int\fP(3). +.TP +.B TICKIT_CTLTYPE_STR +The value is a string. Use \fPtickit_term_setctl_str\fP(3). +.PP +For unrecognised control types, the function returns 0. .SH "RETURN VALUE" -\fBtickit_term_ctlname\fP() returns a constant string pointer. \fBtickit_term_lookup_ctl\fP() returns an control constant or -1. +\fBtickit_term_ctlname\fP() returns a constant string pointer. \fBtickit_term_lookup_ctl\fP() returns an control constant or -1. \fBtickit_term_ctltype\fP() returns a control type constant or 0. .SH "SEE ALSO" .BR tickit_term (7), .BR tickit (7) |