104b94745Smrg/* $XTermId: xcharmouse.h,v 1.19 2020/08/03 23:14:06 tom Exp $ */
2d522f475Smrg
3d522f475Smrg/************************************************************
4d522f475Smrg
5f2e35a3aSmrgCopyright 1997-2012,2020 by Thomas E. Dickey
6d522f475SmrgCopyright 1998 by Jason Bacon <acadix@execpc.com>
7d522f475Smrg
8d522f475Smrg                        All Rights Reserved
9d522f475Smrg
10d522f475SmrgPermission to use, copy, modify, and distribute this software and its
11d522f475Smrgdocumentation for any purpose and without fee is hereby granted,
12d522f475Smrgprovided that the above copyright notice appear in all copies and that
13d522f475Smrgboth that copyright notice and this permission notice appear in
14d522f475Smrgsupporting documentation, and that the name of the above listed
15d522f475Smrgcopyright holder(s) not be used in advertising or publicity pertaining
16d522f475Smrgto distribution of the software without specific, written prior
17d522f475Smrgpermission.
18d522f475Smrg
19d522f475SmrgTHE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
20d522f475SmrgTO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
21d522f475SmrgAND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
22d522f475SmrgLIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
23d522f475SmrgWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
24d522f475SmrgACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
25d522f475SmrgOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
26d522f475Smrg
27d522f475Smrg********************************************************/
28d522f475Smrg
29d522f475Smrg#ifndef included_xcharmouse_h
30d522f475Smrg#define included_xcharmouse_h
310bd37d32Smrg/* *INDENT-OFF* */
32d522f475Smrg
33d522f475Smrg/*
340bd37d32Smrg * Macros for dpmodes (Thomas Dickey and others):
35d522f475Smrg * J. Bacon, acadix@execpc.com, June 1998
36d522f475Smrg * Steve Wall, September 1999
37d522f475Smrg * Ilya Zakharevich, August 2002
380bd37d32Smrg * Ryan Johnson, August 2010
390bd37d32Smrg * Egmont Koblinger, December 2011
40d522f475Smrg */
41d522f475Smrg
42d522f475Smrg/* DECSET arguments for turning on mouse reporting modes */
43d522f475Smrg#define SET_X10_MOUSE               9
44d522f475Smrg#define SET_VT200_MOUSE             1000
45d522f475Smrg#define SET_VT200_HIGHLIGHT_MOUSE   1001
46d522f475Smrg#define SET_BTN_EVENT_MOUSE         1002
47d522f475Smrg#define SET_ANY_EVENT_MOUSE         1003
48d522f475Smrg
49d522f475Smrg#if OPT_FOCUS_EVENT
50d522f475Smrg#define SET_FOCUS_EVENT_MOUSE       1004 /* can be combined with above */
51d522f475Smrg#endif
52d522f475Smrg
53f2e35a3aSmrg#define SET_ALTERNATE_SCROLL        1007 /* wheel mouse may send cursor-keys */
54f2e35a3aSmrg
55492d43a5Smrg/* Extend mouse tracking for terminals wider(taller) than 223 cols(rows) */
56492d43a5Smrg#define SET_EXT_MODE_MOUSE          1005 /* compatible with above */
570bd37d32Smrg#define SET_SGR_EXT_MODE_MOUSE      1006
580bd37d32Smrg#define SET_URXVT_EXT_MODE_MOUSE    1015
590bd37d32Smrg
60f2e35a3aSmrg#define SET_PIXEL_POSITION_MOUSE    1016 /* like 1006, but pixels not chars */
61492d43a5Smrg
62d522f475Smrg#define SET_BUTTON1_MOVE_POINT      2001 /* click1 emit Esc seq to move point*/
63d522f475Smrg#define SET_BUTTON2_MOVE_POINT      2002 /* press2 emit Esc seq to move point*/
64d522f475Smrg#define SET_DBUTTON3_DELETE         2003 /* Double click-3 deletes */
65d522f475Smrg#define SET_PASTE_IN_BRACKET        2004 /* Surround paste by escapes */
66d522f475Smrg#define SET_PASTE_QUOTE             2005 /* Quote each char during paste */
67d522f475Smrg#define SET_PASTE_LITERAL_NL        2006 /* Paste "\n" as C-j */
68d522f475Smrg
69d522f475Smrg#if OPT_DEC_LOCATOR
70d522f475Smrg
71d522f475Smrg/* Bit fields for screen->locator_events */
72d522f475Smrg#define	LOC_BTNS_DN		0x1
73d522f475Smrg#define	LOC_BTNS_UP		0x2
74d522f475Smrg
75d522f475Smrg/* Special values for screen->loc_filter_* */
76d522f475Smrg#define	LOC_FILTER_POS		-1
77d522f475Smrg
78d522f475Smrg#endif /* OPT_DEC_LOCATOR */
79d522f475Smrg
80d522f475Smrg/* Values for screen->send_mouse_pos */
812eaa94a1Schristostypedef enum {
82d522f475Smrg    MOUSE_OFF
83d522f475Smrg    ,X10_MOUSE
84d522f475Smrg    ,VT200_MOUSE
85d522f475Smrg    ,VT200_HIGHLIGHT_MOUSE
86d522f475Smrg    ,BTN_EVENT_MOUSE
87d522f475Smrg    ,ANY_EVENT_MOUSE
88d522f475Smrg    ,DEC_LOCATOR
892eaa94a1Schristos} XtermMouseModes;
90d522f475Smrg
910bd37d32Smrg/* *INDENT-ON* */
920bd37d32Smrg
93d522f475Smrg#endif /* included_xcharmouse_h */
94