Just a little correction at the it.po file.
[midnight-commander.git] / src / mouse.h
blob385aae00246f437d593a887e182447ffe54a0a4c
1 #ifndef MC_MOUSE_H
2 #define MC_MOUSE_H
4 #ifdef HAVE_LIBGPM
6 /* GPM mouse support include file */
7 #include <gpm.h>
9 #else
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 4
16 #define GPM_B_MIDDLE 2
17 #define GPM_B_RIGHT 1
19 /* Xterm mouse support supports only GPM_DOWN and GPM_UP */
20 /* If you use others make sure your code also works without them */
21 enum Gpm_Etype {
22 GPM_MOVE=1,
23 GPM_DRAG=2, /* exactly one in four is active at a time */
24 GPM_DOWN=4,
25 GPM_UP= 8,
27 #define GPM_BARE_EVENTS(ev) ((ev)&0xF)
29 GPM_SINGLE=16, /* at most one in three is set */
30 GPM_DOUBLE=32,
31 GPM_TRIPLE=64,
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 {
39 int buttons, x, y;
40 enum Gpm_Etype type;
41 } 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 };
50 /* Mouse callback */
51 typedef int (*mouse_h) (Gpm_Event *, void *);
53 /* Type of mouse support */
54 typedef enum {
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_Type;
61 /* Type of the currently used mouse */
62 extern Mouse_Type use_mouse_p;
64 /* The mouse is currently: 1 - enabled, 0 - disabled */
65 extern int mouse_enabled;
67 /* String indicating that a mouse event has occured, usually "\E[M" */
68 extern char *xmouse_seq;
70 void init_mouse (void);
71 void enable_mouse (void);
72 void disable_mouse (void);
74 /* Mouse wheel events */
75 #ifndef GPM_B_DOWN
76 #define GPM_B_DOWN 32
77 #endif
79 #ifndef GPM_B_UP
80 #define GPM_B_UP 16
81 #endif
83 #ifdef HAVE_LIBGPM
85 /* GPM specific mouse support definitions */
86 void show_mouse_pointer (int x, int y);
88 #else
90 /* Mouse support definitions for non-GPM mouse */
91 #define show_mouse_pointer(a,b)
93 #endif
95 #endif /* MC_MOUSE_H */