From 219442cff707a1febb6a75ba2cfe48b02ae0a22e Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Fri, 7 Jan 2011 14:34:45 +0000 Subject: Sync OpenBSD patchset 828: 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. --- tmux.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 221164cd..65905e87 100644 --- a/tmux.h +++ b/tmux.h @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.600 2011-01-03 23:52:38 tcunha Exp $ */ +/* $Id: tmux.h,v 1.601 2011-01-07 14:34:45 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -546,6 +546,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) @@ -1071,15 +1072,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. */ @@ -1813,6 +1814,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); @@ -2011,6 +2013,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 *); /* osdep-*.c */ char *osdep_get_name(int, char *); -- cgit