~ubuntu-branches/ubuntu/quantal/splitvt/quantal

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifdef SPLITVT_SOURCE
#include "vt100.h"
#include "video.h"
#endif

#define REPORT_SELECTION

/* Definitions for button_state bitmasks */
#define BUTTON_MASK		0x03
#define BUTTON_1		0x00
#define BUTTON_2		0x01
#define BUTTON_3		0x02
#define RELEASE			0x03
#define SHIFT			0x04
#define META			0x08
#define CONTROL			0x0F
#define SELECTED		0xF0

struct event {
	int happening;
	unsigned char button_state;
	unsigned int x;
	unsigned int y;
#ifdef REPORT_SELECTION
	struct {
		int begin_col;
		int begin_row;
		int end_col;
		int end_row;
		} selection;
#endif
};
#define BUTTON_ISSET(X, B)	((X.button_state&BUTTON_MASK) == B)
   
extern int terminal_input;	/* Set true if event_getc() can read input */

extern int  event_init();
extern int  event_getc();
extern void event_quit();