diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2014-10-22 22:23:01 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2014-10-22 22:23:01 +0200 |
commit | f1f9a00cda728eabd833e81e14cc7606bb34986a (patch) | |
tree | ae3b4e37a4c0e20778896dec1d049626b91b7bf2 /termo.h | |
parent | 70bcfde0212b4009467f8551c197743b70355b99 (diff) | |
download | termo-f1f9a00cda728eabd833e81e14cc7606bb34986a.tar.gz termo-f1f9a00cda728eabd833e81e14cc7606bb34986a.tar.xz termo-f1f9a00cda728eabd833e81e14cc7606bb34986a.zip |
Add support for setting the mouse protocol
Diffstat (limited to 'termo.h')
-rw-r--r-- | termo.h | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -121,6 +121,26 @@ enum termo_mouse_event TERMO_MOUSE_RELEASE }; +// You will want to handle GPM (incompatible license) and FreeBSD's sysmouse +// yourself. http://www.monkey.org/openbsd/archive/tech/0009/msg00018.html + +enum +{ + TERMO_MOUSE_PROTO_NONE = 0, + TERMO_MOUSE_PROTO_VT200 = 1 << 0, + TERMO_MOUSE_PROTO_UTF8 = 1 << 1 | TERMO_MOUSE_PROTO_VT200, + TERMO_MOUSE_PROTO_SGR = 1 << 2 | TERMO_MOUSE_PROTO_VT200, + TERMO_MOUSE_PROTO_RXVT = 1 << 3 | TERMO_MOUSE_PROTO_VT200 +}; + +typedef enum termo_mouse_tracking termo_mouse_tracking_t; +enum termo_mouse_tracking +{ + TERMO_MOUSE_TRACKING_NORMAL, + TERMO_MOUSE_TRACKING_DRAG, + TERMO_MOUSE_TRACKING_ANY +}; + enum { TERMO_KEYMOD_SHIFT = 1 << 0, @@ -209,6 +229,13 @@ size_t termo_get_buffer_remaining (termo_t *tk); void termo_canonicalise (termo_t *tk, termo_key_t *key); +int termo_get_mouse_proto (termo_t *tk); +int termo_set_mouse_proto (termo_t *tk, int proto); +int termo_guess_mouse_proto (termo_t *tk); + +termo_mouse_tracking_t termo_get_mouse_tracking_mode (termo_t *tk); +int termo_set_mouse_tracking_mode (termo_t *tk, termo_mouse_tracking_t mode); + termo_result_t termo_getkey (termo_t *tk, termo_key_t *key); termo_result_t termo_getkey_force (termo_t *tk, termo_key_t *key); termo_result_t termo_waitkey (termo_t *tk, termo_key_t *key); |