diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2011-01-03 23:35:21 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2011-01-03 23:35:21 +0000 |
commit | ac3b78a84178a308536a56ea114b0f6f8ce6fb47 (patch) | |
tree | 71c4a4c1030c29d670c965315b0c87dccf9c8972 /tmux.h | |
parent | 5158dd9a8dddf34a00ec6359840488d34faabd88 (diff) | |
download | rtmux-ac3b78a84178a308536a56ea114b0f6f8ce6fb47.tar.gz rtmux-ac3b78a84178a308536a56ea114b0f6f8ce6fb47.tar.bz2 rtmux-ac3b78a84178a308536a56ea114b0f6f8ce6fb47.zip |
Support for UTF-8 mouse input (\033[1005h). This was added in xterm 262
and supports larger terminals than the older way.
If the new mouse-utf8 option is on, UTF-8 mouse input is enabled for all
UTF-8 terminals. The option defaults to on if LANG etc are set in the
same manner as the utf8 option.
With help and based on code from hsim at gmx.li.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -550,6 +550,7 @@ struct mode_key_table { #define MODE_MOUSE_HIGHLIGHT 0x40 #define MODE_MOUSE_BUTTON 0x80 #define MODE_MOUSE_ANY 0x100 +#define MODE_MOUSE_UTF8 0x200 #define ALL_MOUSE_MODES (MODE_MOUSE_STANDARD| \ MODE_MOUSE_HIGHLIGHT|MODE_MOUSE_BUTTON|MODE_MOUSE_ANY) @@ -1075,15 +1076,15 @@ struct tty_ctx { */ /* Mouse input. */ struct mouse_event { - u_char b; + u_int b; #define MOUSE_1 0 #define MOUSE_2 1 #define MOUSE_3 2 #define MOUSE_UP 3 #define MOUSE_BUTTON 3 #define MOUSE_45 64 - u_char x; - u_char y; + u_int x; + u_int y; }; /* Saved message entry. */ @@ -1817,6 +1818,7 @@ void screen_write_cursormode(struct screen_write_ctx *, int); void screen_write_reverseindex(struct screen_write_ctx *); void screen_write_scrollregion(struct screen_write_ctx *, u_int, u_int); void screen_write_insertmode(struct screen_write_ctx *, int); +void screen_write_utf8mousemode(struct screen_write_ctx *, int); void screen_write_mousemode_on(struct screen_write_ctx *, int); void screen_write_mousemode_off(struct screen_write_ctx *); void screen_write_linefeed(struct screen_write_ctx *, int); @@ -2017,6 +2019,8 @@ void session_group_synchronize1(struct session *, struct session *); void utf8_build(void); int utf8_open(struct utf8_data *, u_char); int utf8_append(struct utf8_data *, u_char); +u_int utf8_combine(const struct utf8_data *); +u_int utf8_split2(u_int, u_char *); /* procname.c */ char *get_proc_name(int, char *); |