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