summaryrefslogtreecommitdiff
path: root/xcore.spec
blob: 8be090dc1648f9cc76005ce3ef7de12056f9ee69 (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// Predefined types: BYTE, INT16, INT32, CARD8, CARD16, CARD32,
//                   STRING8, ID

namespace core {
    
    error bad_request;
    
    type event_mask = bits [~0xFE000000] {
	key_press,
	key_release,
	button_press,
	button_release,
	enter_window,
	leave_window,
	pointer_motion,
	pointer_motion_hint,
	button1_motion,
	button2_motion,
	button3_motion,
	button4_motion,
	button5_motion,
	button_motion,
	keymap_state,
	exposure,
	visibility_change,
	structure_notify,
	resize_redirect,
	structure_notify,
	substructure_notify,
	substructure_redirect,
	focus_change,
	property_change,
	colormap_change,
	owner_grab_button,
    };
    
    type pointer_event_mask = event_mask [~0xFFFF8003];
    type device_event_mask = event_mask [~0xFFFFC0B0];
    
    type bitmask =		xid;
    type window =		xid;
    type pixmap =		xid;
    type cursor =		xid;
    type font =		xid;
    type g_context =	xid;
    type colormap =		xid;
    type drawable =		xid;
    type fontable =		xid;
    type atom =		xid;
    type visual =		xid;
    
    type bit_gravity = enum {
	forget, north_west, north, north_east, west,
	center, east, south_west, south, south_east,
	static,
    };
    
    type win_gravity = enum {
	unmap, north_west, north, north_east, west,
	center, east, south_west, south, south_east,
	static
    };
    
    type key_but_mask = bits [~0xE000] {
	shift,   lock,    control, mod1,
	mod2,    mod3,    mod4,    mod5,
	button1, button2, button3, button4,
	button5
    }
    
    type char_2b = struct {
	card8 byte1;
	card8 byte2;
    };
    
    type string16 = list[char_2b];
    
    type point = struct {
	int16	x, y;
    };
    
    type rectangle = struct {
	int16	x, y;
	card16	width, height;
    };
    
    type arc = struct {
	int16	x, y;
	card16	width, height;
	int16	angle1, angle2;
    };
    
    type window_class = enum {
	copy_from_parent,
	input_output,
	input_only,
    };
    
    /* more types needed ... */
    
    /* events */
    event key_press [1] {
	window		root;
	window		event_window;
	window?		child;
	bool		same_screen;
	int16		root_x, root_y, event_x, event_y;
	keycode		keycode;
	key_but_mask	state;
	timestamp		time;
    }
    
    /* requests */
    request create_window [1] {
	card8		depth;
	window		wid *;
	window		parent;
	int16		x, y;
	card16		width, height;
	card15		border_width;
	window_class	class;
	visual		visual;
    }
    
    request query_extension [100] {
	string8		name;
	
    reply:
	boolean		present;
	card8		major_opcode;
	card8		first_event;
	card8		first_error;
    };
    
    
    
    /* events */
    
    event key_release [1] {
	window		root;
	window		event_window;
	window?		child;
	boolean		same_screen;
	int16		root_x, root_y, event_x, event_y;
	keycode		keycode;
	key_but_mask	state;
	timestamp		time;
    }
    
    error request_err;
}