This repository has been archived by the owner on Dec 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext.h
144 lines (126 loc) · 2.51 KB
/
ext.h
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
#include "extapi.h"
#include <X11/Xproto.h>
/* Something needs to be #include'd before this to
define CARD*, etc. */
#define X_EvictNop 0
#define X_EvictPixmaps 1
#define X_EvictResource 2
#define X_EvictConn 3
#define X_EvictCursor 4
typedef struct EvictNop {
CARD8 reqType;
CARD8 evictType;
CARD16 length;
} xEvictNopReq;
#define sz_xEvictNopReq 4
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused;
CARD16 sequenceNumber;
CARD32 length;
CARD32 reply;
CARD32 pad0;
CARD32 pad1;
CARD32 pad2;
CARD32 pad3;
CARD32 pad4;
} xEvictNopReply;
typedef struct EvictPixmaps {
CARD8 reqType;
CARD8 evictType;
CARD16 length;
} xEvictPixmapsReq;
#define sz_xEvictPixmapsReq 4
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused;
CARD16 sequenceNumber;
CARD32 length;
CARD32 reply;
CARD32 pad0;
CARD32 pad1;
CARD32 pad2;
CARD32 pad3;
CARD32 pad4;
} xEvictPixmapsReply;
typedef struct EvictResource {
CARD8 reqType;
CARD8 evictType;
CARD16 length;
CARD32 res;
} xEvictResourceReq;
#define sz_xEvictResourceReq 8
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused;
CARD16 sequenceNumber;
CARD32 length;
CARD32 num;
CARD32 pad0;
CARD32 pad1;
CARD32 pad2;
CARD32 pad3;
CARD32 pad4;
} xEvictResourceReply;
/* Resource values for res field of EvictResourceReq */
enum {
ExtRT_WINDOW = 0,
ExtRT_PIXMAP,
ExtRT_GC,
ExtRT_FONT,
ExtRT_CURSOR,
ExtRT_COLORMAP,
ExtRT_CMAPENTRY,
ExtRT_OTHERCLIENT,
ExtRT_PASSIVEGRAB,
ExtRT_NUM,
};
typedef struct EvictConn {
CARD8 reqType;
CARD8 evictType;
CARD16 length;
CARD32 id;
} xEvictConnReq;
#define sz_xEvictConnReq 8
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused;
CARD16 sequenceNumber;
CARD32 length;
CARD32 inode;
CARD32 pad0;
CARD32 pad1;
CARD32 pad2;
CARD32 pad3;
CARD32 pad4;
} xEvictConnReply;
#define EXTNAME "GUIEVICT"
#define ExtNumberEvents 0
#define ExtNumberErrors 0
#define ExtMAGIC 0x01234567
enum {
CURSORMAX = 128 /* BYTES, not bits */
};
struct cursor {
unsigned long id;
char src[CURSORMAX];
char msk[CURSORMAX];
int emptymsk;
int width, height, xhot, yhot;
unsigned short fore_red, fore_green, fore_blue;
unsigned short back_red, back_green, back_blue;
unsigned long nbytes;
};
struct windowx {
unsigned long id;
int backgroundState; /* None, Relative, Pixel, Pixmap */
unsigned long bgpixel;
unsigned long bgpm;
int mapped;
};
union resu {
unsigned long xid;
struct extGC gc;
struct cursor cursor;
struct windowx winx;
};