1TERMKEY_INTERPRET_POSITION(3L)ibrary Functions ManuaTlERMKEY_INTERPRET_POSITION(3)
2
3
4

NAME

6       termkey_interpret_position  -  interpret  opaque  cursor position event
7       data
8

SYNOPSIS

10       #include <termkey.h>
11
12       TermKeyResult termkey_interpret_position(TermKey *tk, const TermKeyKey *key,
13           int *line, int *col);
14
15       Link with -ltermkey.
16

DESCRIPTION

18       termkey_interpret_position() fills in variables in the passed  pointers
19       according  to  the cursor position report event found in key. It should
20       be called if termkey_getkey(3) or similar have  returned  a  key  event
21       with the type of TERMKEY_TYPE_POSITION.
22
23       Any pointer may instead be given as NULL to not return that value.
24
25       The  line and col variables will be filled in with the cursor position,
26       indexed from 1. Note that due to the limited number  of  bytes  in  the
27       TermKeyKey  structure,  the line and column numbers are limited to 2047
28       and 4095 respectively.
29

RETURN VALUE

31       If passed a key event of the type TERMKEY_TYPE_POSITION, this  function
32       will  return TERMKEY_RES_KEY and will affect the variables whose point‐
33       ers were passed in, as described above.
34
35       For other event types it will return TERMKEY_RES_NONE, and its  effects
36       on any variables whose pointers were passed in, are undefined.
37

SEE ALSO

39       termkey_waitkey(3), termkey_getkey(3), termkey(7)
40
41
42
43                                                 TERMKEY_INTERPRET_POSITION(3)
Impressum