comparison semiconginev2/old/thirdparty/x11/xinput2.nim @ 1218:56781cc0fc7c compiletime-tests

did: renamge main package
author sam <sam@basx.dev>
date Wed, 17 Jul 2024 21:01:37 +0700
parents semicongine/old/thirdparty/x11/xinput2.nim@239adab121a3
children
comparison
equal deleted inserted replaced
1217:f819a874058f 1218:56781cc0fc7c
1 # *****************************************
2 # Generated from <X11/extensions/XInput2.h>
3 # *****************************************
4 import x, xlib, xi2
5
6 # <X11/extensions/xfixes.h>
7 type PointerBarrier* = XID
8
9 type
10 PXIAddMasterInfo* = ptr XIAddMasterInfo
11 XIAddMasterInfo* {.final.} = object
12 `type`*: cint
13 name*: cstring
14 send_core*: XBool
15 enable*: XBool
16
17 PXIRemoveMasterInfo* = ptr XIRemoveMasterInfo
18 XIRemoveMasterInfo* {.final.} = object
19 `type`*: cint
20 deviceid*: cint
21 return_mode*: cint ## AttachToMaster, Floating
22 return_pointer*: cint
23 return_keyboard*: cint
24
25 PXIAttachSlaveInfo* = ptr XIAttachSlaveInfo
26 XIAttachSlaveInfo* {.final.} = object
27 `type`*: cint
28 deviceid*: cint
29 new_master*: cint
30
31 PXIDetachSlaveInfo* = ptr XIDetachSlaveInfo
32 XIDetachSlaveInfo* {.final.} = object
33 `type`*: cint
34 deviceid*: cint
35
36 PXIAnyHierarchyChangeInfo* = ptr XIAnyHierarchyChangeInfo
37 XIAnyHierarchyChangeInfo* {.final, union.} = object
38 `type`*: cint ## must be first element
39 add*: XIAddMasterInfo
40 remove*: XIRemoveMasterInfo
41 attach*: XIAttachSlaveInfo
42 detach*: XIDetachSlaveInfo
43
44 PXIModifierState* = ptr XIModifierState
45 XIModifierState* {.final.} = object
46 base*: cint
47 latched*: cint
48 locked*: cint
49 effective*: cint
50
51 PXIGroupState* = ptr XIGroupState
52 XIGroupState* = XIModifierState
53
54 PXIButtonState* = ptr XIButtonState
55 XIButtonState* {.final.} = object
56 mask_len*: cint
57 mask*: ptr cuchar
58
59 PXIValuatorState* = ptr XIValuatorState
60 XIValuatorState* {.final.} = object
61 mask_len*: cint
62 mask*: ptr cuchar
63 values*: ptr cdouble
64
65 PXIEventMask* = ptr XIEventMask
66 XIEventMask* {.final.} = object
67 deviceid*: cint
68 mask_len*: cint
69 mask*: ptr cuchar
70
71 PXIAnyClassInfo* = ptr XIAnyClassInfo
72 XIAnyClassInfo* {.final.} = object
73 `type`*: cint
74 sourceid*: cint
75
76 PXIButtonClassInfo* = ptr XIButtonClassInfo
77 XIButtonClassInfo* {.final.} = object
78 `type`*: cint
79 sourceid*: cint
80 num_buttons*: cint
81 labels*: PAtom
82 state*: XIButtonState
83
84 PXIKeyClassInfo* = ptr XIKeyClassInfo
85 XIKeyClassInfo* {.final.} = object
86 `type`*: cint
87 sourceid*: cint
88 num_keycodes*: cint
89 keycodes*: ptr cint
90
91 PXIValuatorClassInfo* = ptr XIValuatorClassInfo
92 XIValuatorClassInfo* {.final.} = object
93 `type`*: cint
94 sourceid*: cint
95 number*: cint
96 label*: Atom
97 min*: cdouble
98 max*: cdouble
99 value*: cdouble
100 resolution*: cint
101 mode*: cint
102
103
104 ## new in XI 2.1
105
106 type
107 PXIScrollClassInfo* = ptr XIScrollClassInfo
108 XIScrollClassInfo* {.final.} = object
109 `type`*: cint
110 sourceid*: cint
111 number*: cint
112 scroll_type*: cint
113 increment*: cdouble
114 flags*: cint
115
116 PXITouchClassInfo* = ptr XITouchClassInfo
117 XITouchClassInfo* {.final.} = object
118 `type`*: cint
119 sourceid*: cint
120 mode*: cint
121 num_touches*: cint
122
123 PXIDeviceInfo* = ptr XIDeviceInfo
124 XIDeviceInfo* {.final.} = object
125 deviceid*: cint
126 name*: cstring
127 use*: cint
128 attachment*: cint
129 enabled*: XBool
130 num_classes*: cint
131 classes*: ptr ptr XIAnyClassInfo
132
133 PXIGrabModifiers* = ptr XIGrabModifiers
134 XIGrabModifiers* {.final.} = object
135 modifiers*: cint
136 status*: cint
137
138 BarrierEventID* = cuint
139 # ------------------------------------------------------------
140 PXIBarrierReleasePointerInfo* = ptr XIBarrierReleasePointerInfo
141 XIBarrierReleasePointerInfo* {.final.} = object
142 deviceid*: cint
143 barrier*: PointerBarrier
144 eventid*: BarrierEventID
145
146 ##
147 ## Generic XI2 event. All XI2 events have the same header.
148 ##
149
150 type
151 PXIEvent* = ptr XIEvent
152 XIEvent* {.final.} = object
153 `type`*: cint ## GenericEvent
154 serial*: culong ## # of last request processed by server
155 send_event*: XBool ## true if this came from a SendEvent request
156 display*: PDisplay ## Display the event was read from
157 extension*: cint ## XI extension offset
158 evtype*: cint
159 time*: Time
160
161 PXIHierarchyInfo* = ptr XIHierarchyInfo
162 XIHierarchyInfo* {.final.} = object
163 deviceid*: cint
164 attachment*: cint
165 use*: cint
166 enabled*: XBool
167 flags*: cint
168
169 ##
170 ## Notifies the client that the device hierarchy has been changed. The client
171 ## is expected to re-query the server for the device hierarchy.
172 ##
173
174 type
175 PXIHierarchyEvent* = ptr XIHierarchyEvent
176 XIHierarchyEvent* {.final.} = object
177 `type`*: cint ## GenericEvent
178 serial*: culong ## # of last request processed by server
179 send_event*: XBool ## true if this came from a SendEvent request
180 display*: PDisplay ## Display the event was read from
181 extension*: cint ## XI extension offset
182 evtype*: cint ## XI_HierarchyChanged
183 time*: Time
184 flags*: cint
185 num_info*: cint
186 info*: ptr XIHierarchyInfo
187
188 ##
189 ## Notifies the client that the classes have been changed. This happens when
190 ## the slave device that sends through the master changes.
191 ##
192
193 type
194 PXIDeviceChangedEvent* = ptr XIDeviceChangedEvent
195 XIDeviceChangedEvent* {.final.} = object
196 `type`*: cint ## GenericEvent
197 serial*: culong ## # of last request processed by server
198 send_event*: XBool ## true if this came from a SendEvent request
199 display*: PDisplay ## Display the event was read from
200 extension*: cint ## XI extension offset
201 evtype*: cint ## XI_DeviceChanged
202 time*: Time
203 deviceid*: cint ## id of the device that changed
204 sourceid*: cint ## Source for the new classes.
205 reason*: cint ## Reason for the change
206 num_classes*: cint
207 classes*: ptr ptr XIAnyClassInfo ## same as in XIDeviceInfo
208
209 PXIDeviceEvent* = ptr XIDeviceEvent
210 XIDeviceEvent* {.final.} = object
211 `type`*: cint ## GenericEvent
212 serial*: culong ## # of last request processed by server
213 send_event*: XBool ## true if this came from a SendEvent request
214 display*: PDisplay ## Display the event was read from
215 extension*: cint ## XI extension offset
216 evtype*: cint
217 time*: Time
218 deviceid*: cint
219 sourceid*: cint
220 detail*: cint
221 root*: Window
222 event*: Window
223 child*: Window
224 root_x*: cdouble
225 root_y*: cdouble
226 event_x*: cdouble
227 event_y*: cdouble
228 flags*: cint
229 buttons*: XIButtonState
230 valuators*: XIValuatorState
231 mods*: XIModifierState
232 group*: XIGroupState
233
234 PXIRawEvent* = ptr XIRawEvent
235 XIRawEvent* {.final.} = object
236 `type`*: cint ## GenericEvent
237 serial*: culong ## # of last request processed by server
238 send_event*: XBool ## true if this came from a SendEvent request
239 display*: PDisplay ## Display the event was read from
240 extension*: cint ## XI extension offset
241 evtype*: cint ## XI_RawKeyPress, XI_RawKeyRelease, etc.
242 time*: Time
243 deviceid*: cint
244 sourceid*: cint ## Bug: Always 0. https://bugs.freedesktop.org//show_bug.cgi?id=34240
245 detail*: cint
246 flags*: cint
247 valuators*: XIValuatorState
248 raw_values*: ptr cdouble
249
250 PXIEnterEvent* = ptr XIEnterEvent
251 XIEnterEvent* {.final.} = object
252 `type`*: cint ## GenericEvent
253 serial*: culong ## # of last request processed by server
254 send_event*: XBool ## true if this came from a SendEvent request
255 display*: PDisplay ## Display the event was read from
256 extension*: cint ## XI extension offset
257 evtype*: cint
258 time*: Time
259 deviceid*: cint
260 sourceid*: cint
261 detail*: cint
262 root*: Window
263 event*: Window
264 child*: Window
265 root_x*: cdouble
266 root_y*: cdouble
267 event_x*: cdouble
268 event_y*: cdouble
269 mode*: cint
270 focus*: XBool
271 same_screen*: XBool
272 buttons*: XIButtonState
273 mods*: XIModifierState
274 group*: XIGroupState
275
276 PXILeaveEvent* = PXIEnterEvent
277 PXIFocusInEvent* = PXIEnterEvent
278 PXIFocusOutEvent* = PXIEnterEvent
279 # ----------------------------------
280 XILeaveEvent* = XIEnterEvent
281 XIFocusInEvent* = XIEnterEvent
282 XIFocusOutEvent* = XIEnterEvent
283
284 PXIPropertyEvent* = ptr XIPropertyEvent
285 XIPropertyEvent* {.final.} = object
286 `type`*: cint ## GenericEvent
287 serial*: culong ## # of last request processed by server
288 send_event*: XBool ## true if this came from a SendEvent request
289 display*: PDisplay ## Display the event was read from
290 extension*: cint ## XI extension offset
291 evtype*: cint ## XI_PropertyEvent
292 time*: Time
293 deviceid*: cint ## id of the device that changed
294 property*: Atom
295 what*: cint
296
297 PXITouchOwnershipEvent* = ptr XITouchOwnershipEvent
298 XITouchOwnershipEvent* {.final.} = object
299 `type`*: cint ## GenericEvent
300 serial*: culong ## # of last request processed by server
301 send_event*: XBool ## true if this came from a SendEvent request
302 display*: PDisplay ## Display the event was read from
303 extension*: cint ## XI extension offset
304 evtype*: cint
305 time*: Time
306 deviceid*: cint
307 sourceid*: cint
308 touchid*: cuint
309 root*: Window
310 event*: Window
311 child*: Window
312 flags*: cint
313
314 PXIBarrierEvent* = ptr XIBarrierEvent
315 XIBarrierEvent* {.final.} = object
316 `type`*: cint ## GenericEvent
317 serial*: culong ## # of last request processed by server
318 send_event*: XBool ## true if this came from a SendEvent request
319 display*: PDisplay ## Display the event was read from
320 extension*: cint ## XI extension offset
321 evtype*: cint
322 time*: Time
323 deviceid*: cint
324 sourceid*: cint
325 event*: Window
326 root*: Window
327 root_x*: cdouble
328 root_y*: cdouble
329 dx*: cdouble
330 dy*: cdouble
331 dtime*: cint
332 flags*: cint
333 barrier*: PointerBarrier
334 eventid*: BarrierEventID
335
336 ##
337 ## XI2 Procs, uses same shared object as XI
338 ##
339
340 {.push cdecl, importc, dynlib: libXi.}
341
342 proc XIQueryPointer*(display: PDisplay; deviceid: cint; win: Window;
343 root: PWindow; child: PWindow; root_x: ptr cdouble;
344 root_y: ptr cdouble; win_x: ptr cdouble; win_y: ptr cdouble;
345 buttons: PXIButtonState; mods: PXIModifierState;
346 group: PXIGroupState): XBool
347 proc XIWarpPointer*(display: PDisplay; deviceid: cint; src_win: Window;
348 dst_win: Window; src_x: cdouble; src_y: cdouble; src_width: cuint;
349 src_height: cuint; dst_x: cdouble; dst_y: cdouble): XBool
350 proc XIDefineCursor*(display: PDisplay; deviceid: cint; win: Window; cursor: Cursor): Status
351 proc XIUndefineCursor*(display: PDisplay; deviceid: cint; win: Window): Status
352 proc XIChangeHierarchy*(display: PDisplay; changes: PXIAnyHierarchyChangeInfo;
353 num_changes: cint): Status
354 proc XISetClientPointer*(dpy: PDisplay; win: Window; deviceid: cint): Status
355 proc XIGetClientPointer*(dpy: PDisplay; win: Window; deviceid: ptr cint): XBool
356 proc XISelectEvents*(dpy: PDisplay; win: Window; masks: PXIEventMask;
357 num_masks: cint): cint
358 proc XIGetSelectedEvents*(dpy: PDisplay; win: Window; num_masks_return: ptr cint): PXIEventMask
359 proc XIQueryVersion*(dpy: PDisplay; major_version_inout: ptr cint;
360 minor_version_inout: ptr cint): Status
361 proc XIQueryDevice*(dpy: PDisplay; deviceid: cint; ndevices_return: ptr cint): PXIDeviceInfo
362 proc XISetFocus*(dpy: PDisplay; deviceid: cint; focus: Window; time: Time): Status
363 proc XIGetFocus*(dpy: PDisplay; deviceid: cint; focus_return: PWindow): Status
364 proc XIGrabDevice*(dpy: PDisplay; deviceid: cint; grab_window: Window; time: Time;
365 cursor: Cursor; grab_mode: cint; paired_device_mode: cint;
366 owner_events: XBool; mask: PXIEventMask): Status
367 proc XIUngrabDevice*(dpy: PDisplay; deviceid: cint; time: Time): Status
368 proc XIAllowEvents*(display: PDisplay; deviceid: cint; event_mode: cint; time: Time): Status
369 proc XIAllowTouchEvents*(display: PDisplay; deviceid: cint; touchid: cuint;
370 grab_window: Window; event_mode: cint): Status
371 proc XIGrabButton*(display: PDisplay; deviceid: cint; button: cint;
372 grab_window: Window; cursor: Cursor; grab_mode: cint;
373 paired_device_mode: cint; owner_events: cint;
374 mask: PXIEventMask; num_modifiers: cint;
375 modifiers_inout: PXIGrabModifiers): cint
376 proc XIGrabKeycode*(display: PDisplay; deviceid: cint; keycode: cint;
377 grab_window: Window; grab_mode: cint; paired_device_mode: cint;
378 owner_events: cint; mask: PXIEventMask; num_modifiers: cint;
379 modifiers_inout: PXIGrabModifiers): cint
380 proc XIGrabEnter*(display: PDisplay; deviceid: cint; grab_window: Window;
381 cursor: Cursor; grab_mode: cint; paired_device_mode: cint;
382 owner_events: cint; mask: PXIEventMask; num_modifiers: cint;
383 modifiers_inout: PXIGrabModifiers): cint
384 proc XIGrabFocusIn*(display: PDisplay; deviceid: cint; grab_window: Window;
385 grab_mode: cint; paired_device_mode: cint; owner_events: cint;
386 mask: PXIEventMask; num_modifiers: cint;
387 modifiers_inout: PXIGrabModifiers): cint
388 proc XIGrabTouchBegin*(display: PDisplay; deviceid: cint; grab_window: Window;
389 owner_events: cint; mask: PXIEventMask; num_modifiers: cint;
390 modifiers_inout: PXIGrabModifiers): cint
391 proc XIUngrabButton*(display: PDisplay; deviceid: cint; button: cint;
392 grab_window: Window; num_modifiers: cint;
393 modifiers: PXIGrabModifiers): Status
394 proc XIUngrabKeycode*(display: PDisplay; deviceid: cint; keycode: cint;
395 grab_window: Window; num_modifiers: cint;
396 modifiers: PXIGrabModifiers): Status
397 proc XIUngrabEnter*(display: PDisplay; deviceid: cint; grab_window: Window;
398 num_modifiers: cint; modifiers: PXIGrabModifiers): Status
399 proc XIUngrabFocusIn*(display: PDisplay; deviceid: cint; grab_window: Window;
400 num_modifiers: cint; modifiers: PXIGrabModifiers): Status
401 proc XIUngrabTouchBegin*(display: PDisplay; deviceid: cint; grab_window: Window;
402 num_modifiers: cint; modifiers: PXIGrabModifiers): Status
403 proc XIListProperties*(display: PDisplay; deviceid: cint;
404 num_props_return: ptr cint): PAtom
405 proc XIChangeProperty*(display: PDisplay; deviceid: cint; property: Atom;
406 `type`: Atom; format: cint; mode: cint; data: ptr cuchar;
407 num_items: cint)
408 proc XIDeleteProperty*(display: PDisplay; deviceid: cint; property: Atom)
409 proc XIGetProperty*(display: PDisplay; deviceid: cint; property: Atom; offset: clong;
410 length: clong; delete_property: XBool; `type`: Atom;
411 type_return: PAtom; format_return: ptr cint;
412 num_items_return: ptr culong; bytes_after_return: ptr culong;
413 data: ptr ptr cuchar): Status
414 proc XIBarrierReleasePointers*(display: PDisplay;
415 barriers: PXIBarrierReleasePointerInfo;
416 num_barriers: cint)
417 proc XIBarrierReleasePointer*(display: PDisplay; deviceid: cint;
418 barrier: PointerBarrier; eventid: BarrierEventID)
419 proc XIFreeDeviceInfo*(info: PXIDeviceInfo)
420
421 {.pop.}