|
NAMEtermkey_interpret_mouse - interpret opaque mouse event dataSYNOPSIS#include <termkey.h> TermKeyResult termkey_interpret_mouse(TermKey *tk, const TermKeyKey *key, TermKeyMouseEvent *ev, int *button, int *line, int *col); Link with -ltermkey. DESCRIPTIONtermkey_interpret_mouse() fills in variables in the passed pointers according to the mouse event found in key. It should be called if termkey_getkey(3) or similar have returned a key event with the type of TERMKEY_TYPE_MOUSE.Any pointer may instead be given as NULL to not return that value. The ev variable will take one of the following values:
The line and col variables will be filled in with the mouse position, indexed from 1. Note that due to the limited number of bytes in the TermKeyKey structure, the line and column numbers are limited to 2047 and 4095 respectively. RETURN VALUEIf passed a key event of the type TERMKEY_TYPE_MOUSE, this function will return TERMKEY_RES_KEY and will affect the variables whose pointers were passed in, as described above.For other event types it will return TERMKEY_RES_NONE, and its effects on any variables whose pointers were passed in, are undefined. SEE ALSOtermkey_waitkey(3), termkey_getkey(3), termkey(7) Visit the GSP FreeBSD Man Page Interface. |