6 /* GPM mouse support include file */
11 /* Equivalent definitions for non-GPM mouse support */
12 /* These lines are modified version from the lines appearing in the */
13 /* gpm.h include file of the Linux General Purpose Mouse server */
15 #define GPM_B_LEFT (1 << 2)
16 #define GPM_B_MIDDLE (1 << 1)
17 #define GPM_B_RIGHT (1 << 0)
19 /* Xterm mouse support supports only GPM_DOWN and GPM_UP */
20 /* If you use others make sure your code also works without them */
23 GPM_DRAG
=2, /* exactly one in four is active at a time */
27 #define GPM_BARE_EVENTS(ev) ((ev)&0xF)
29 GPM_SINGLE
=16, /* at most one in three is set */
33 GPM_MFLAG
=128, /* motion during click? */
34 GPM_HARD
=256 /* if set in the defaultMask, force an already
35 used event to pass over to another handler */
38 typedef struct Gpm_Event
{
43 #endif /* !HAVE_LIBGPM */
45 /* General (i.e. both for xterm and gpm) mouse support definitions */
47 /* Constants returned from the mouse callback */
48 enum { MOU_NORMAL
, MOU_REPEAT
};
51 typedef int (*mouse_h
) (Gpm_Event
*, void *);
53 /* Type of mouse support */
55 MOUSE_NONE
, /* Not detected yet */
56 MOUSE_DISABLED
, /* Explicitly disabled by -d */
57 MOUSE_GPM
, /* Support using GPM on Linux */
58 MOUSE_XTERM
, /* Support using xterm-style mouse reporting */
59 MOUSE_XTERM_NORMAL_TRACKING
= MOUSE_XTERM
,
60 MOUSE_XTERM_BUTTON_EVENT_TRACKING
63 /* Type of the currently used mouse */
64 extern Mouse_Type use_mouse_p
;
66 /* The mouse is currently: 1 - enabled, 0 - disabled */
67 extern int mouse_enabled
;
69 /* String indicating that a mouse event has occured, usually "\E[M" */
70 extern const char *xmouse_seq
;
72 void init_mouse (void);
73 void enable_mouse (void);
74 void disable_mouse (void);
76 /* Mouse wheel events */
78 #define GPM_B_DOWN (1 << 5)
82 #define GPM_B_UP (1 << 4)
87 /* GPM specific mouse support definitions */
88 void show_mouse_pointer (int x
, int y
);
92 /* Mouse support definitions for non-GPM mouse */
93 #define show_mouse_pointer(a,b)