diff options
Diffstat (limited to 'src/mev.c')
-rw-r--r-- | src/mev.c | 48 |
1 files changed, 37 insertions, 11 deletions
@@ -1,19 +1,19 @@ /* * Copyright (C) 2003 Red Hat, Inc. * - * This is free software; you can redistribute it and/or modify it under - * the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include <config.h> @@ -42,7 +42,9 @@ static enum { tracking_mouse = 1000, tracking_hilite = 1001, tracking_cell_motion = 1002, - tracking_all_motion = 1003 + tracking_all_motion = 1003, + tracking_xterm_ext = 1006, + tracking_urxvt = 1015 } tracking_mode = 0; static void @@ -59,6 +61,8 @@ reset(void) decset(tracking_hilite, FALSE); decset(tracking_cell_motion, FALSE); decset(tracking_all_motion, FALSE); + decset(tracking_xterm_ext, FALSE); + decset(tracking_urxvt, FALSE); fflush(stdout); } @@ -93,6 +97,14 @@ clear(void) fprintf(stdout, "All motion tracking enabled.\r\n"); decset(tracking_all_motion, TRUE); break; + case tracking_xterm_ext: + fprintf(stdout, "Xterm 1006 mouse tracking extension enabled.\r\n"); + decset(tracking_xterm_ext, TRUE); + break; + case tracking_urxvt: + fprintf(stdout, "rxvt-unicode 1015 mouse tracking extension enabled.\r\n"); + decset(tracking_urxvt, TRUE); + break; default: fprintf(stdout, "Tracking disabled.\r\n"); break; @@ -102,6 +114,8 @@ clear(void) fprintf(stdout, "C - Hilite tracking [FIXME: NOT IMPLEMENTED].\r\n"); fprintf(stdout, "D - Cell motion tracking.\r\n"); fprintf(stdout, "E - All motion tracking.\r\n"); + fprintf(stdout, "F - Xterm 1006 extension.\r\n"); + fprintf(stdout, "G - rxvt-unicode extension.\r\n"); fprintf(stdout, "%s", _VTE_CAP_ESC "8"); fflush(stdout); } @@ -153,6 +167,18 @@ parse(void) 0 : tracking_all_motion; i++; break; + case 'F': + case 'f': + tracking_mode = (tracking_mode == tracking_xterm_ext) ? + 0 : tracking_xterm_ext; + i++; + break; + case 'G': + case 'g': + tracking_mode = (tracking_mode == tracking_urxvt) ? + 0 : tracking_urxvt; + i++; + break; case 'Q': case 'q': ret = TRUE; |