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 */
16 #define GPM_B_MIDDLE 2
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 mouse support definitions */
47 typedef int (*mouse_h
)(Gpm_Event
*, void *);
50 MOUSE_NONE
, /* Not detected yet */
51 MOUSE_DISABLED
, /* Explicitly disabled by -d */
52 MOUSE_GPM
, /* Support using GPM on Linux */
53 MOUSE_XTERM
/* Support using xterm-style mouse reporting */
56 /* Type of the currently used mouse */
57 extern Mouse_Type use_mouse_p
;
59 /* The mouse is currently: 1 - enabled, 0 - disabled */
60 extern int mouse_enabled
;
62 /* String indicating that a mouse event has occured, usually "\E[M" */
63 extern char *xmouse_seq
;
65 void init_mouse (void);
66 void enable_mouse (void);
67 void disable_mouse (void);
69 /* Constants returned from mouse handlers */
71 #define MOU_NORMAL 0x00
72 #define MOU_REPEAT 0x01
73 #define MOU_ENDLOOP 0x02
78 /* GPM specific mouse support definitions */
79 void show_mouse_pointer (int x
, int y
);
83 /* Mouse support definitions for non-GPM mouse */
84 #define show_mouse_pointer(a,b)
88 #endif /* MC_MOUSE_H */