annotate semiconginev2/thirdparty/x11/xi2.nim @ 1222:3c3d4d7a8ecd compiletime-tests

did: cleanup config file
author sam <sam@basx.dev>
date Wed, 17 Jul 2024 21:08:15 +0700
parents 56781cc0fc7c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1191
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1 # *************************************
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2 # Generated from <X11/extensions/XI2.h>
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
3 # *************************************
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
5 from xi import libXi
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
6 export libXi
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
8 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
9 XInput_2_0* = 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
10
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
11 ## DO NOT ADD TO THIS LIST. These are libXi-specific defines.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
12 ## See commit libXi-1.4.2-21-ge8531dd
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
13
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
14 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
15 XI_2_Major* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
16 XI_2_Minor* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
17
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
18 ## Property event flags
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
19
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
20 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
21 XIPropertyDeleted* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
22 XIPropertyCreated* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
23 XIPropertyModified* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
24
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
25 ## Property modes
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
26
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
27 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
28 XIPropModeReplace* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
29 XIPropModePrepend* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
30 XIPropModeAppend* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
31
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
32 ## Special property type used for XIGetProperty
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
33
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
34 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
35 XIAnyPropertyType* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
36
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
37 ## Enter/Leave and Focus In/Out modes
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
38
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
39 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
40 XINotifyNormal* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
41 XINotifyGrab* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
42 XINotifyUngrab* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
43 XINotifyWhileGrabbed* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
44 XINotifyPassiveGrab* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
45 XINotifyPassiveUngrab* = 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
46
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
47 ## Enter/Leave and focus In/out detail
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
48
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
49 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
50 XINotifyAncestor* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
51 XINotifyVirtual* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
52 XINotifyInferior* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
53 XINotifyNonlinear* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
54 XINotifyNonlinearVirtual* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
55 XINotifyPointer* = 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
56 XINotifyPointerRoot* = 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
57 XINotifyDetailNone* = 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
58
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
59 ## Grab modes
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
60
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
61 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
62 XIGrabModeSync* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
63 XIGrabModeAsync* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
64 XIGrabModeTouch* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
65
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
66 ## Grab reply status codes
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
67
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
68 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
69 XIGrabSuccess* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
70 XIAlreadyGrabbed* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
71 XIGrabInvalidTime* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
72 XIGrabNotViewable* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
73 XIGrabFrozen* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
74
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
75 ## Grab owner events values
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
76
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
77 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
78 XIOwnerEvents* = true
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
79 XINoOwnerEvents* = false
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
80
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
81 ## Passive grab types
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
82
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
83 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
84 XIGrabtypeButton* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
85 XIGrabtypeKeycode* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
86 XIGrabtypeEnter* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
87 XIGrabtypeFocusIn* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
88 XIGrabtypeTouchBegin* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
89
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
90 ## Passive grab modifier
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
91
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
92 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
93 XIAnyModifier* = (1 shl 31)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
94 XIAnyButton* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
95 XIAnyKeycode* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
96
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
97 ## XIAllowEvents event-modes
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
98
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
99 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
100 XIAsyncDevice* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
101 XISyncDevice* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
102 XIReplayDevice* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
103 XIAsyncPairedDevice* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
104 XIAsyncPair* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
105 XISyncPair* = 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
106 XIAcceptTouch* = 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
107 XIRejectTouch* = 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
108
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
109 ## DeviceChangedEvent change reasons
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
110
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
111 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
112 XISlaveSwitch* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
113 XIDeviceChange* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
114
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
115 ## Hierarchy flags
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
116
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
117 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
118 XIMasterAdded* = (1 shl 0)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
119 XIMasterRemoved* = (1 shl 1)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
120 XISlaveAdded* = (1 shl 2)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
121 XISlaveRemoved* = (1 shl 3)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
122 XISlaveAttached* = (1 shl 4)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
123 XISlaveDetached* = (1 shl 5)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
124 XIDeviceEnabled* = (1 shl 6)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
125 XIDeviceDisabled* = (1 shl 7)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
126
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
127 ## ChangeHierarchy constants
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
128
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
129 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
130 XIAddMaster* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
131 XIRemoveMaster* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
132 XIAttachSlave* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
133 XIDetachSlave* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
134 XIAttachToMaster* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
135 XIFloating* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
136
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
137 ## Valuator modes
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
138
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
139 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
140 XIModeRelative* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
141 XIModeAbsolute* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
142
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
143 ## Device types
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
144
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
145 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
146 XIMasterPointer* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
147 XIMasterKeyboard* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
148 XISlavePointer* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
149 XISlaveKeyboard* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
150 XIFloatingSlave* = 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
151
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
152 ## Device classes: classes that are not identical to Xi 1.x classes must be
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
153 ## numbered starting from 8.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
154
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
155 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
156 XIKeyClass* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
157 XIButtonClass* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
158 XIValuatorClass* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
159 XIScrollClass* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
160 XITouchClass* = 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
161
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
162 ## Scroll class types
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
163
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
164 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
165 XIScrollTypeVertical* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
166 XIScrollTypeHorizontal* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
167
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
168 ## Scroll class flags
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
169
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
170 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
171 XIScrollFlagNoEmulation* = (1 shl 0)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
172 XIScrollFlagPreferred* = (1 shl 1)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
173
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
174 ## Device event flags (common)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
175 ## Device event flags (key events only)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
176
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
177 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
178 XIKeyRepeat* = (1 shl 16)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
179
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
180 ## Device event flags (pointer events only)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
181
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
182 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
183 XIPointerEmulated* = (1 shl 16)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
184
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
185 ## Device event flags (touch events only)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
186
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
187 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
188 XITouchPendingEnd* = (1 shl 16)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
189 XITouchEmulatingPointer* = (1 shl 17)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
190
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
191 ## Barrier event flags
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
192
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
193 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
194 XIBarrierPointerReleased* = (1 shl 0)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
195 XIBarrierDeviceIsGrabbed* = (1 shl 1)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
196
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
197 ## Touch modes
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
198
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
199 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
200 XIDirectTouch* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
201 XIDependentTouch* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
202
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
203 ## XI2 event mask macros
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
204 type XIMask = ptr UncheckedArray[uint8]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
205
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
206 template XISetMask*(mask: pointer, event: untyped): untyped =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
207 ((cast[XIMask]((mask)))[(event) shr 3] = (cast[XIMask]((mask)))[
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
208 (event) shr 3] or (1 shl ((event) and 7)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
209
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
210 template XIClearMask*(mask: pointer, event: untyped): untyped =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
211 ((cast[XIMask]((mask)))[(event) shr 3] = (cast[XIMask]((mask)))[
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
212 (event) shr 3] and not (1 shl ((event) and 7)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
213
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
214 template XIMaskIsSet*(mask: pointer, event: untyped): untyped =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
215 ((cast[XIMask]((mask)))[(event) shr 3].int and (1 shl ((event) and 7)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
216
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
217 template XIMaskLen*(event: untyped): untyped =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
218 (((event) shr 3) + 1)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
219
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
220 ## Fake device ID's for event selection
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
221
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
222 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
223 XIAllDevices* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
224 XIAllMasterDevices* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
225
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
226 ## Event types
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
227
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
228 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
229 XI_DeviceChanged* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
230 XI_KeyPress* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
231 XI_KeyRelease* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
232 XI_ButtonPress* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
233 XI_ButtonRelease* = 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
234 XI_Motion* = 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
235 XI_Enter* = 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
236 XI_Leave* = 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
237 XI_FocusIn* = 9
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
238 XI_FocusOut* = 10
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
239 XI_HierarchyChanged* = 11
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
240 XI_PropertyEvent* = 12
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
241 XI_RawKeyPress* = 13
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
242 XI_RawKeyRelease* = 14
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
243 XI_RawButtonPress* = 15
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
244 XI_RawButtonRelease* = 16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
245 XI_RawMotion* = 17
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
246 XI_TouchBegin* = 18
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
247 XI_TouchUpdate* = 19
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
248 XI_TouchEnd* = 20
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
249 XI_TouchOwnership* = 21
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
250 XI_RawTouchBegin* = 22
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
251 XI_RawTouchUpdate* = 23
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
252 XI_RawTouchEnd* = 24
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
253 XI_BarrierHit* = 25
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
254 XI_BarrierLeave* = 26
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
255 XI_LASTEVENT* = XI_BarrierLeave
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
256
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
257 ## NOTE: XI2LASTEVENT in xserver/include/inputstr.h must be the same value
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
258 ## as XI_LASTEVENT if the server is supposed to handle masks etc. for this
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
259 ## type of event.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
260 ## Event masks.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
261 ## Note: the protocol spec defines a mask to be of (1 << type). Clients are
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
262 ## free to create masks by bitshifting instead of using these defines.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
263 ##
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
264
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
265 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
266 XI_DeviceChangedMask* = (1 shl XI_DeviceChanged)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
267 XI_KeyPressMask* = (1 shl XI_KeyPress)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
268 XI_KeyReleaseMask* = (1 shl XI_KeyRelease)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
269 XI_ButtonPressMask* = (1 shl XI_ButtonPress)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
270 XI_ButtonReleaseMask* = (1 shl XI_ButtonRelease)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
271 XI_MotionMask* = (1 shl XI_Motion)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
272 XI_EnterMask* = (1 shl XI_Enter)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
273 XI_LeaveMask* = (1 shl XI_Leave)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
274 XI_FocusInMask* = (1 shl XI_FocusIn)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
275 XI_FocusOutMask* = (1 shl XI_FocusOut)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
276 XI_HierarchyChangedMask* = (1 shl XI_HierarchyChanged)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
277 XI_PropertyEventMask* = (1 shl XI_PropertyEvent)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
278 XI_RawKeyPressMask* = (1 shl XI_RawKeyPress)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
279 XI_RawKeyReleaseMask* = (1 shl XI_RawKeyRelease)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
280 XI_RawButtonPressMask* = (1 shl XI_RawButtonPress)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
281 XI_RawButtonReleaseMask* = (1 shl XI_RawButtonRelease)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
282 XI_RawMotionMask* = (1 shl XI_RawMotion)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
283 XI_TouchBeginMask* = (1 shl XI_TouchBegin)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
284 XI_TouchEndMask* = (1 shl XI_TouchEnd)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
285 XI_TouchOwnershipChangedMask* = (1 shl XI_TouchOwnership)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
286 XI_TouchUpdateMask* = (1 shl XI_TouchUpdate)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
287 XI_RawTouchBeginMask* = (1 shl XI_RawTouchBegin)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
288 XI_RawTouchEndMask* = (1 shl XI_RawTouchEnd)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
289 XI_RawTouchUpdateMask* = (1 shl XI_RawTouchUpdate)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
290 XI_BarrierHitMask* = (1 shl XI_BarrierHit)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
291 XI_BarrierLeaveMask* = (1 shl XI_BarrierLeave)