| 1 | use super::xfixes::PointerBarrier; |
| 2 | use super::xlib::{Atom, Display, Time, Window}; |
| 3 | use std::os::raw::{c_double, c_int, c_long, c_uchar, c_uint, c_ulong}; |
| 4 | |
| 5 | // |
| 6 | // macro translations |
| 7 | // |
| 8 | fn mask_byte(mask_flag: i32) -> usize { |
| 9 | (mask_flag >> 3) as usize |
| 10 | } |
| 11 | |
| 12 | pub fn XISetMask(mask: &mut [::std::os::raw::c_uchar], event: i32) { |
| 13 | mask[mask_byte(mask_flag:event)] |= 1 << (event & 7); |
| 14 | } |
| 15 | |
| 16 | pub fn XIClearMask(mask: &mut [::std::os::raw::c_uchar], event: i32) { |
| 17 | mask[mask_byte(mask_flag:event)] &= 1 << (event & 7); |
| 18 | } |
| 19 | |
| 20 | pub fn XIMaskIsSet(mask: &[::std::os::raw::c_uchar], event: i32) -> bool { |
| 21 | (mask[mask_byte(mask_flag:event)] & (1 << (event & 7))) != 0 |
| 22 | } |
| 23 | |
| 24 | // |
| 25 | // functions |
| 26 | // |
| 27 | x11_link! { XInput2, xi, ["libXi.so.6" , "libXi.so" ], 34, |
| 28 | pub fn XIAllowEvents (_4: *mut Display, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, |
| 29 | pub fn XIAllowTouchEvents (_5: *mut Display, _4: c_int, _3: c_uint, _2: c_ulong, _1: c_int) -> c_int, |
| 30 | pub fn XIBarrierReleasePointer (_4: *mut Display, _3: c_int, _2: c_ulong, _1: c_uint) -> (), |
| 31 | pub fn XIBarrierReleasePointers (_3: *mut Display, _2: *mut XIBarrierReleasePointerInfo, _1: c_int) -> (), |
| 32 | pub fn XIChangeHierarchy (_3: *mut Display, _2: *mut XIAnyHierarchyChangeInfo, _1: c_int) -> c_int, |
| 33 | pub fn XIChangeProperty (_8: *mut Display, _7: c_int, _6: c_ulong, _5: c_ulong, _4: c_int, _3: c_int, _2: *mut c_uchar, _1: c_int) -> (), |
| 34 | pub fn XIDefineCursor (_4: *mut Display, _3: c_int, _2: c_ulong, _1: c_ulong) -> c_int, |
| 35 | pub fn XIDeleteProperty (_3: *mut Display, _2: c_int, _1: c_ulong) -> (), |
| 36 | pub fn XIFreeDeviceInfo (_1: *mut XIDeviceInfo) -> (), |
| 37 | pub fn XIGetClientPointer (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> c_int, |
| 38 | pub fn XIGetFocus (_3: *mut Display, _2: c_int, _1: *mut c_ulong) -> c_int, |
| 39 | pub fn XIGetProperty (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_long, _8: c_long, _7: c_int, _6: c_ulong, _5: *mut c_ulong, _4: *mut c_int, _3: *mut c_ulong, _2: *mut c_ulong, _1: *mut *mut c_uchar) -> c_int, |
| 40 | pub fn XIGetSelectedEvents (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> *mut XIEventMask, |
| 41 | pub fn XIGrabButton (_11: *mut Display, _10: c_int, _9: c_int, _8: c_ulong, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: *mut XIEventMask, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, |
| 42 | pub fn XIGrabDevice (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: c_ulong, _4: c_int, _3: c_int, _2: c_int, _1: *mut XIEventMask) -> c_int, |
| 43 | pub fn XIGrabEnter (_10: *mut Display, _9: c_int, _8: c_ulong, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: *mut XIEventMask, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, |
| 44 | pub fn XIGrabFocusIn (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: *mut XIEventMask, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, |
| 45 | pub fn XIGrabKeycode (_10: *mut Display, _9: c_int, _8: c_int, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: *mut XIEventMask, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, |
| 46 | pub fn XIGrabTouchBegin (_7: *mut Display, _6: c_int, _5: c_ulong, _4: c_int, _3: *mut XIEventMask, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, |
| 47 | pub fn XIListProperties (_3: *mut Display, _2: c_int, _1: *mut c_int) -> *mut c_ulong, |
| 48 | pub fn XIQueryDevice (_3: *mut Display, _2: c_int, _1: *mut c_int) -> *mut XIDeviceInfo, |
| 49 | pub fn XIQueryPointer (_12: *mut Display, _11: c_int, _10: c_ulong, _9: *mut c_ulong, _8: *mut c_ulong, _7: *mut c_double, _6: *mut c_double, _5: *mut c_double, _4: *mut c_double, _3: *mut XIButtonState, _2: *mut XIModifierState, _1: *mut XIModifierState) -> c_int, |
| 50 | pub fn XIQueryVersion (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, |
| 51 | pub fn XISelectEvents (_4: *mut Display, _3: c_ulong, _2: *mut XIEventMask, _1: c_int) -> c_int, |
| 52 | pub fn XISetClientPointer (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int, |
| 53 | pub fn XISetFocus (_4: *mut Display, _3: c_int, _2: c_ulong, _1: c_ulong) -> c_int, |
| 54 | pub fn XIUndefineCursor (_3: *mut Display, _2: c_int, _1: c_ulong) -> c_int, |
| 55 | pub fn XIUngrabButton (_6: *mut Display, _5: c_int, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, |
| 56 | pub fn XIUngrabDevice (_3: *mut Display, _2: c_int, _1: c_ulong) -> c_int, |
| 57 | pub fn XIUngrabEnter (_5: *mut Display, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, |
| 58 | pub fn XIUngrabFocusIn (_5: *mut Display, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, |
| 59 | pub fn XIUngrabKeycode (_6: *mut Display, _5: c_int, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, |
| 60 | pub fn XIUngrabTouchBegin (_5: *mut Display, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, |
| 61 | pub fn XIWarpPointer (_10: *mut Display, _9: c_int, _8: c_ulong, _7: c_ulong, _6: c_double, _5: c_double, _4: c_uint, _3: c_uint, _2: c_double, _1: c_double) -> c_int, |
| 62 | variadic: |
| 63 | globals: |
| 64 | } |
| 65 | |
| 66 | // |
| 67 | // constants |
| 68 | // (auto-generated with cmacros) |
| 69 | // |
| 70 | |
| 71 | pub const XInput_2_0: i32 = 7; |
| 72 | pub const XI_2_Major: i32 = 2; |
| 73 | pub const XI_2_Minor: i32 = 3; |
| 74 | pub const XIPropertyDeleted: i32 = 0; |
| 75 | pub const XIPropertyCreated: i32 = 1; |
| 76 | pub const XIPropertyModified: i32 = 2; |
| 77 | pub const XIPropModeReplace: i32 = 0; |
| 78 | pub const XIPropModePrepend: i32 = 1; |
| 79 | pub const XIPropModeAppend: i32 = 2; |
| 80 | pub const XINotifyNormal: i32 = 0; |
| 81 | pub const XINotifyGrab: i32 = 1; |
| 82 | pub const XINotifyUngrab: i32 = 2; |
| 83 | pub const XINotifyWhileGrabbed: i32 = 3; |
| 84 | pub const XINotifyPassiveGrab: i32 = 4; |
| 85 | pub const XINotifyPassiveUngrab: i32 = 5; |
| 86 | pub const XINotifyAncestor: i32 = 0; |
| 87 | pub const XINotifyVirtual: i32 = 1; |
| 88 | pub const XINotifyInferior: i32 = 2; |
| 89 | pub const XINotifyNonlinear: i32 = 3; |
| 90 | pub const XINotifyNonlinearVirtual: i32 = 4; |
| 91 | pub const XINotifyPointer: i32 = 5; |
| 92 | pub const XINotifyPointerRoot: i32 = 6; |
| 93 | pub const XINotifyDetailNone: i32 = 7; |
| 94 | pub const XIGrabModeSync: i32 = 0; |
| 95 | pub const XIGrabModeAsync: i32 = 1; |
| 96 | pub const XIGrabModeTouch: i32 = 2; |
| 97 | pub const XIGrabSuccess: i32 = 0; |
| 98 | pub const XIAlreadyGrabbed: i32 = 1; |
| 99 | pub const XIGrabInvalidTime: i32 = 2; |
| 100 | pub const XIGrabNotViewable: i32 = 3; |
| 101 | pub const XIGrabFrozen: i32 = 4; |
| 102 | pub const XIGrabtypeButton: i32 = 0; |
| 103 | pub const XIGrabtypeKeycode: i32 = 1; |
| 104 | pub const XIGrabtypeEnter: i32 = 2; |
| 105 | pub const XIGrabtypeFocusIn: i32 = 3; |
| 106 | pub const XIGrabtypeTouchBegin: i32 = 4; |
| 107 | pub const XIAnyButton: i32 = 0; |
| 108 | pub const XIAnyKeycode: i32 = 0; |
| 109 | pub const XIAsyncDevice: i32 = 0; |
| 110 | pub const XISyncDevice: i32 = 1; |
| 111 | pub const XIReplayDevice: i32 = 2; |
| 112 | pub const XIAsyncPairedDevice: i32 = 3; |
| 113 | pub const XIAsyncPair: i32 = 4; |
| 114 | pub const XISyncPair: i32 = 5; |
| 115 | pub const XIAcceptTouch: i32 = 6; |
| 116 | pub const XIRejectTouch: i32 = 7; |
| 117 | pub const XISlaveSwitch: i32 = 1; |
| 118 | pub const XIDeviceChange: i32 = 2; |
| 119 | pub const XIMasterAdded: i32 = 1 << 0; |
| 120 | pub const XIMasterRemoved: i32 = 1 << 1; |
| 121 | pub const XISlaveAdded: i32 = 1 << 2; |
| 122 | pub const XISlaveRemoved: i32 = 1 << 3; |
| 123 | pub const XISlaveAttached: i32 = 1 << 4; |
| 124 | pub const XISlaveDetached: i32 = 1 << 5; |
| 125 | pub const XIDeviceEnabled: i32 = 1 << 6; |
| 126 | pub const XIDeviceDisabled: i32 = 1 << 7; |
| 127 | pub const XIAddMaster: i32 = 1; |
| 128 | pub const XIRemoveMaster: i32 = 2; |
| 129 | pub const XIAttachSlave: i32 = 3; |
| 130 | pub const XIDetachSlave: i32 = 4; |
| 131 | pub const XIAttachToMaster: i32 = 1; |
| 132 | pub const XIFloating: i32 = 2; |
| 133 | pub const XIModeRelative: i32 = 0; |
| 134 | pub const XIModeAbsolute: i32 = 1; |
| 135 | pub const XIMasterPointer: i32 = 1; |
| 136 | pub const XIMasterKeyboard: i32 = 2; |
| 137 | pub const XISlavePointer: i32 = 3; |
| 138 | pub const XISlaveKeyboard: i32 = 4; |
| 139 | pub const XIFloatingSlave: i32 = 5; |
| 140 | pub const XIKeyClass: i32 = 0; |
| 141 | pub const XIButtonClass: i32 = 1; |
| 142 | pub const XIValuatorClass: i32 = 2; |
| 143 | pub const XIScrollClass: i32 = 3; |
| 144 | pub const XITouchClass: i32 = 8; |
| 145 | pub const XIScrollTypeVertical: i32 = 1; |
| 146 | pub const XIScrollTypeHorizontal: i32 = 2; |
| 147 | pub const XIScrollFlagNoEmulation: i32 = 1 << 0; |
| 148 | pub const XIScrollFlagPreferred: i32 = 1 << 1; |
| 149 | pub const XIKeyRepeat: i32 = 1 << 16; |
| 150 | pub const XIPointerEmulated: i32 = 1 << 16; |
| 151 | pub const XITouchPendingEnd: i32 = 1 << 16; |
| 152 | pub const XITouchEmulatingPointer: i32 = 1 << 17; |
| 153 | pub const XIBarrierPointerReleased: i32 = 1 << 0; |
| 154 | pub const XIBarrierDeviceIsGrabbed: i32 = 1 << 1; |
| 155 | pub const XIDirectTouch: i32 = 1; |
| 156 | pub const XIDependentTouch: i32 = 2; |
| 157 | pub const XIAllDevices: i32 = 0; |
| 158 | pub const XIAllMasterDevices: i32 = 1; |
| 159 | pub const XI_DeviceChanged: i32 = 1; |
| 160 | pub const XI_KeyPress: i32 = 2; |
| 161 | pub const XI_KeyRelease: i32 = 3; |
| 162 | pub const XI_ButtonPress: i32 = 4; |
| 163 | pub const XI_ButtonRelease: i32 = 5; |
| 164 | pub const XI_Motion: i32 = 6; |
| 165 | pub const XI_Enter: i32 = 7; |
| 166 | pub const XI_Leave: i32 = 8; |
| 167 | pub const XI_FocusIn: i32 = 9; |
| 168 | pub const XI_FocusOut: i32 = 10; |
| 169 | pub const XI_HierarchyChanged: i32 = 11; |
| 170 | pub const XI_PropertyEvent: i32 = 12; |
| 171 | pub const XI_RawKeyPress: i32 = 13; |
| 172 | pub const XI_RawKeyRelease: i32 = 14; |
| 173 | pub const XI_RawButtonPress: i32 = 15; |
| 174 | pub const XI_RawButtonRelease: i32 = 16; |
| 175 | pub const XI_RawMotion: i32 = 17; |
| 176 | pub const XI_TouchBegin: i32 = 18 /* XI 2.2 */; |
| 177 | pub const XI_TouchUpdate: i32 = 19; |
| 178 | pub const XI_TouchEnd: i32 = 20; |
| 179 | pub const XI_TouchOwnership: i32 = 21; |
| 180 | pub const XI_RawTouchBegin: i32 = 22; |
| 181 | pub const XI_RawTouchUpdate: i32 = 23; |
| 182 | pub const XI_RawTouchEnd: i32 = 24; |
| 183 | pub const XI_BarrierHit: i32 = 25 /* XI 2.3 */; |
| 184 | pub const XI_BarrierLeave: i32 = 26; |
| 185 | pub const XI_LASTEVENT: i32 = XI_BarrierLeave; |
| 186 | pub const XI_DeviceChangedMask: i32 = 1 << XI_DeviceChanged; |
| 187 | pub const XI_KeyPressMask: i32 = 1 << XI_KeyPress; |
| 188 | pub const XI_KeyReleaseMask: i32 = 1 << XI_KeyRelease; |
| 189 | pub const XI_ButtonPressMask: i32 = 1 << XI_ButtonPress; |
| 190 | pub const XI_ButtonReleaseMask: i32 = 1 << XI_ButtonRelease; |
| 191 | pub const XI_MotionMask: i32 = 1 << XI_Motion; |
| 192 | pub const XI_EnterMask: i32 = 1 << XI_Enter; |
| 193 | pub const XI_LeaveMask: i32 = 1 << XI_Leave; |
| 194 | pub const XI_FocusInMask: i32 = 1 << XI_FocusIn; |
| 195 | pub const XI_FocusOutMask: i32 = 1 << XI_FocusOut; |
| 196 | pub const XI_HierarchyChangedMask: i32 = 1 << XI_HierarchyChanged; |
| 197 | pub const XI_PropertyEventMask: i32 = 1 << XI_PropertyEvent; |
| 198 | pub const XI_RawKeyPressMask: i32 = 1 << XI_RawKeyPress; |
| 199 | pub const XI_RawKeyReleaseMask: i32 = 1 << XI_RawKeyRelease; |
| 200 | pub const XI_RawButtonPressMask: i32 = 1 << XI_RawButtonPress; |
| 201 | pub const XI_RawButtonReleaseMask: i32 = 1 << XI_RawButtonRelease; |
| 202 | pub const XI_RawMotionMask: i32 = 1 << XI_RawMotion; |
| 203 | pub const XI_TouchBeginMask: i32 = 1 << XI_TouchBegin; |
| 204 | pub const XI_TouchEndMask: i32 = 1 << XI_TouchEnd; |
| 205 | pub const XI_TouchOwnershipChangedMask: i32 = 1 << XI_TouchOwnership; |
| 206 | pub const XI_TouchUpdateMask: i32 = 1 << XI_TouchUpdate; |
| 207 | pub const XI_RawTouchBeginMask: i32 = 1 << XI_RawTouchBegin; |
| 208 | pub const XI_RawTouchEndMask: i32 = 1 << XI_RawTouchEnd; |
| 209 | pub const XI_RawTouchUpdateMask: i32 = 1 << XI_RawTouchUpdate; |
| 210 | pub const XI_BarrierHitMask: i32 = 1 << XI_BarrierHit; |
| 211 | pub const XI_BarrierLeaveMask: i32 = 1 << XI_BarrierLeave; |
| 212 | |
| 213 | // |
| 214 | // structs |
| 215 | // (auto-generated with rust-bindgen) |
| 216 | // |
| 217 | |
| 218 | #[repr (C)] |
| 219 | #[derive (Debug, Copy)] |
| 220 | pub struct XIAddMasterInfo { |
| 221 | pub _type: ::std::os::raw::c_int, |
| 222 | pub name: *mut ::std::os::raw::c_char, |
| 223 | pub send_core: ::std::os::raw::c_int, |
| 224 | pub enable: ::std::os::raw::c_int, |
| 225 | } |
| 226 | impl ::std::clone::Clone for XIAddMasterInfo { |
| 227 | fn clone(&self) -> Self { |
| 228 | *self |
| 229 | } |
| 230 | } |
| 231 | impl ::std::default::Default for XIAddMasterInfo { |
| 232 | fn default() -> Self { |
| 233 | unsafe { ::std::mem::zeroed() } |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | #[repr (C)] |
| 238 | #[derive (Debug, Copy)] |
| 239 | pub struct XIRemoveMasterInfo { |
| 240 | pub _type: ::std::os::raw::c_int, |
| 241 | pub deviceid: ::std::os::raw::c_int, |
| 242 | pub return_mode: ::std::os::raw::c_int, |
| 243 | pub return_pointer: ::std::os::raw::c_int, |
| 244 | pub return_keyboard: ::std::os::raw::c_int, |
| 245 | } |
| 246 | impl ::std::clone::Clone for XIRemoveMasterInfo { |
| 247 | fn clone(&self) -> Self { |
| 248 | *self |
| 249 | } |
| 250 | } |
| 251 | impl ::std::default::Default for XIRemoveMasterInfo { |
| 252 | fn default() -> Self { |
| 253 | unsafe { ::std::mem::zeroed() } |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | #[repr (C)] |
| 258 | #[derive (Debug, Copy)] |
| 259 | pub struct XIAttachSlaveInfo { |
| 260 | pub _type: ::std::os::raw::c_int, |
| 261 | pub deviceid: ::std::os::raw::c_int, |
| 262 | pub new_master: ::std::os::raw::c_int, |
| 263 | } |
| 264 | impl ::std::clone::Clone for XIAttachSlaveInfo { |
| 265 | fn clone(&self) -> Self { |
| 266 | *self |
| 267 | } |
| 268 | } |
| 269 | impl ::std::default::Default for XIAttachSlaveInfo { |
| 270 | fn default() -> Self { |
| 271 | unsafe { ::std::mem::zeroed() } |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | #[repr (C)] |
| 276 | #[derive (Debug, Copy)] |
| 277 | pub struct XIDetachSlaveInfo { |
| 278 | pub _type: ::std::os::raw::c_int, |
| 279 | pub deviceid: ::std::os::raw::c_int, |
| 280 | } |
| 281 | impl ::std::clone::Clone for XIDetachSlaveInfo { |
| 282 | fn clone(&self) -> Self { |
| 283 | *self |
| 284 | } |
| 285 | } |
| 286 | impl ::std::default::Default for XIDetachSlaveInfo { |
| 287 | fn default() -> Self { |
| 288 | unsafe { ::std::mem::zeroed() } |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | #[repr (C)] |
| 293 | #[derive (Debug, Copy)] |
| 294 | pub struct XIAnyHierarchyChangeInfo { |
| 295 | pub _bindgen_data_: [u64; 3usize], |
| 296 | } |
| 297 | impl XIAnyHierarchyChangeInfo { |
| 298 | pub unsafe fn _type(&mut self) -> *mut ::std::os::raw::c_int { |
| 299 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); |
| 300 | ::std::mem::transmute(src:raw.offset(count:0)) |
| 301 | } |
| 302 | pub unsafe fn add(&mut self) -> *mut XIAddMasterInfo { |
| 303 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); |
| 304 | ::std::mem::transmute(src:raw.offset(count:0)) |
| 305 | } |
| 306 | pub unsafe fn remove(&mut self) -> *mut XIRemoveMasterInfo { |
| 307 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); |
| 308 | ::std::mem::transmute(src:raw.offset(count:0)) |
| 309 | } |
| 310 | pub unsafe fn attach(&mut self) -> *mut XIAttachSlaveInfo { |
| 311 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); |
| 312 | ::std::mem::transmute(src:raw.offset(count:0)) |
| 313 | } |
| 314 | pub unsafe fn detach(&mut self) -> *mut XIDetachSlaveInfo { |
| 315 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); |
| 316 | ::std::mem::transmute(src:raw.offset(count:0)) |
| 317 | } |
| 318 | } |
| 319 | impl ::std::clone::Clone for XIAnyHierarchyChangeInfo { |
| 320 | fn clone(&self) -> Self { |
| 321 | *self |
| 322 | } |
| 323 | } |
| 324 | impl ::std::default::Default for XIAnyHierarchyChangeInfo { |
| 325 | fn default() -> Self { |
| 326 | unsafe { ::std::mem::zeroed() } |
| 327 | } |
| 328 | } |
| 329 | |
| 330 | #[repr (C)] |
| 331 | #[derive (Debug, Copy)] |
| 332 | pub struct XIModifierState { |
| 333 | pub base: ::std::os::raw::c_int, |
| 334 | pub latched: ::std::os::raw::c_int, |
| 335 | pub locked: ::std::os::raw::c_int, |
| 336 | pub effective: ::std::os::raw::c_int, |
| 337 | } |
| 338 | impl ::std::clone::Clone for XIModifierState { |
| 339 | fn clone(&self) -> Self { |
| 340 | *self |
| 341 | } |
| 342 | } |
| 343 | impl ::std::default::Default for XIModifierState { |
| 344 | fn default() -> Self { |
| 345 | unsafe { ::std::mem::zeroed() } |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | pub type XIGroupState = XIModifierState; |
| 350 | |
| 351 | #[repr (C)] |
| 352 | #[derive (Debug, Copy)] |
| 353 | pub struct XIButtonState { |
| 354 | pub mask_len: ::std::os::raw::c_int, |
| 355 | pub mask: *mut ::std::os::raw::c_uchar, |
| 356 | } |
| 357 | impl ::std::clone::Clone for XIButtonState { |
| 358 | fn clone(&self) -> Self { |
| 359 | *self |
| 360 | } |
| 361 | } |
| 362 | impl ::std::default::Default for XIButtonState { |
| 363 | fn default() -> Self { |
| 364 | unsafe { ::std::mem::zeroed() } |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | #[repr (C)] |
| 369 | #[derive (Debug, Copy)] |
| 370 | pub struct XIValuatorState { |
| 371 | pub mask_len: ::std::os::raw::c_int, |
| 372 | pub mask: *mut ::std::os::raw::c_uchar, |
| 373 | pub values: *mut ::std::os::raw::c_double, |
| 374 | } |
| 375 | impl ::std::clone::Clone for XIValuatorState { |
| 376 | fn clone(&self) -> Self { |
| 377 | *self |
| 378 | } |
| 379 | } |
| 380 | impl ::std::default::Default for XIValuatorState { |
| 381 | fn default() -> Self { |
| 382 | unsafe { ::std::mem::zeroed() } |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | #[repr (C)] |
| 387 | #[derive (Debug, Copy)] |
| 388 | pub struct XIEventMask { |
| 389 | pub deviceid: ::std::os::raw::c_int, |
| 390 | pub mask_len: ::std::os::raw::c_int, |
| 391 | pub mask: *mut ::std::os::raw::c_uchar, |
| 392 | } |
| 393 | impl ::std::clone::Clone for XIEventMask { |
| 394 | fn clone(&self) -> Self { |
| 395 | *self |
| 396 | } |
| 397 | } |
| 398 | impl ::std::default::Default for XIEventMask { |
| 399 | fn default() -> Self { |
| 400 | unsafe { ::std::mem::zeroed() } |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | #[repr (C)] |
| 405 | #[derive (Debug, Copy)] |
| 406 | pub struct XIAnyClassInfo { |
| 407 | pub _type: ::std::os::raw::c_int, |
| 408 | pub sourceid: ::std::os::raw::c_int, |
| 409 | } |
| 410 | impl ::std::clone::Clone for XIAnyClassInfo { |
| 411 | fn clone(&self) -> Self { |
| 412 | *self |
| 413 | } |
| 414 | } |
| 415 | impl ::std::default::Default for XIAnyClassInfo { |
| 416 | fn default() -> Self { |
| 417 | unsafe { ::std::mem::zeroed() } |
| 418 | } |
| 419 | } |
| 420 | |
| 421 | #[repr (C)] |
| 422 | #[derive (Debug, Copy)] |
| 423 | pub struct XIButtonClassInfo { |
| 424 | pub _type: ::std::os::raw::c_int, |
| 425 | pub sourceid: ::std::os::raw::c_int, |
| 426 | pub num_buttons: ::std::os::raw::c_int, |
| 427 | pub labels: *mut Atom, |
| 428 | pub state: XIButtonState, |
| 429 | } |
| 430 | impl ::std::clone::Clone for XIButtonClassInfo { |
| 431 | fn clone(&self) -> Self { |
| 432 | *self |
| 433 | } |
| 434 | } |
| 435 | impl ::std::default::Default for XIButtonClassInfo { |
| 436 | fn default() -> Self { |
| 437 | unsafe { ::std::mem::zeroed() } |
| 438 | } |
| 439 | } |
| 440 | |
| 441 | #[repr (C)] |
| 442 | #[derive (Debug, Copy)] |
| 443 | pub struct XIKeyClassInfo { |
| 444 | pub _type: ::std::os::raw::c_int, |
| 445 | pub sourceid: ::std::os::raw::c_int, |
| 446 | pub num_keycodes: ::std::os::raw::c_int, |
| 447 | pub keycodes: *mut ::std::os::raw::c_int, |
| 448 | } |
| 449 | impl ::std::clone::Clone for XIKeyClassInfo { |
| 450 | fn clone(&self) -> Self { |
| 451 | *self |
| 452 | } |
| 453 | } |
| 454 | impl ::std::default::Default for XIKeyClassInfo { |
| 455 | fn default() -> Self { |
| 456 | unsafe { ::std::mem::zeroed() } |
| 457 | } |
| 458 | } |
| 459 | |
| 460 | #[repr (C)] |
| 461 | #[derive (Debug, Copy)] |
| 462 | pub struct XIValuatorClassInfo { |
| 463 | pub _type: ::std::os::raw::c_int, |
| 464 | pub sourceid: ::std::os::raw::c_int, |
| 465 | pub number: ::std::os::raw::c_int, |
| 466 | pub label: Atom, |
| 467 | pub min: ::std::os::raw::c_double, |
| 468 | pub max: ::std::os::raw::c_double, |
| 469 | pub value: ::std::os::raw::c_double, |
| 470 | pub resolution: ::std::os::raw::c_int, |
| 471 | pub mode: ::std::os::raw::c_int, |
| 472 | } |
| 473 | impl ::std::clone::Clone for XIValuatorClassInfo { |
| 474 | fn clone(&self) -> Self { |
| 475 | *self |
| 476 | } |
| 477 | } |
| 478 | impl ::std::default::Default for XIValuatorClassInfo { |
| 479 | fn default() -> Self { |
| 480 | unsafe { ::std::mem::zeroed() } |
| 481 | } |
| 482 | } |
| 483 | |
| 484 | #[repr (C)] |
| 485 | #[derive (Debug, Copy)] |
| 486 | pub struct XIScrollClassInfo { |
| 487 | pub _type: ::std::os::raw::c_int, |
| 488 | pub sourceid: ::std::os::raw::c_int, |
| 489 | pub number: ::std::os::raw::c_int, |
| 490 | pub scroll_type: ::std::os::raw::c_int, |
| 491 | pub increment: ::std::os::raw::c_double, |
| 492 | pub flags: ::std::os::raw::c_int, |
| 493 | } |
| 494 | impl ::std::clone::Clone for XIScrollClassInfo { |
| 495 | fn clone(&self) -> Self { |
| 496 | *self |
| 497 | } |
| 498 | } |
| 499 | impl ::std::default::Default for XIScrollClassInfo { |
| 500 | fn default() -> Self { |
| 501 | unsafe { ::std::mem::zeroed() } |
| 502 | } |
| 503 | } |
| 504 | |
| 505 | #[repr (C)] |
| 506 | #[derive (Debug, Copy)] |
| 507 | pub struct XITouchClassInfo { |
| 508 | pub _type: ::std::os::raw::c_int, |
| 509 | pub sourceid: ::std::os::raw::c_int, |
| 510 | pub mode: ::std::os::raw::c_int, |
| 511 | pub num_touches: ::std::os::raw::c_int, |
| 512 | } |
| 513 | impl ::std::clone::Clone for XITouchClassInfo { |
| 514 | fn clone(&self) -> Self { |
| 515 | *self |
| 516 | } |
| 517 | } |
| 518 | impl ::std::default::Default for XITouchClassInfo { |
| 519 | fn default() -> Self { |
| 520 | unsafe { ::std::mem::zeroed() } |
| 521 | } |
| 522 | } |
| 523 | |
| 524 | #[repr (C)] |
| 525 | #[derive (Debug, Copy)] |
| 526 | pub struct XIDeviceInfo { |
| 527 | pub deviceid: ::std::os::raw::c_int, |
| 528 | pub name: *mut ::std::os::raw::c_char, |
| 529 | pub _use: ::std::os::raw::c_int, |
| 530 | pub attachment: ::std::os::raw::c_int, |
| 531 | pub enabled: ::std::os::raw::c_int, |
| 532 | pub num_classes: ::std::os::raw::c_int, |
| 533 | pub classes: *mut *mut XIAnyClassInfo, |
| 534 | } |
| 535 | impl ::std::clone::Clone for XIDeviceInfo { |
| 536 | fn clone(&self) -> Self { |
| 537 | *self |
| 538 | } |
| 539 | } |
| 540 | impl ::std::default::Default for XIDeviceInfo { |
| 541 | fn default() -> Self { |
| 542 | unsafe { ::std::mem::zeroed() } |
| 543 | } |
| 544 | } |
| 545 | |
| 546 | #[repr (C)] |
| 547 | #[derive (Debug, Copy)] |
| 548 | pub struct XIGrabModifiers { |
| 549 | pub modifiers: ::std::os::raw::c_int, |
| 550 | pub status: ::std::os::raw::c_int, |
| 551 | } |
| 552 | impl ::std::clone::Clone for XIGrabModifiers { |
| 553 | fn clone(&self) -> Self { |
| 554 | *self |
| 555 | } |
| 556 | } |
| 557 | impl ::std::default::Default for XIGrabModifiers { |
| 558 | fn default() -> Self { |
| 559 | unsafe { ::std::mem::zeroed() } |
| 560 | } |
| 561 | } |
| 562 | |
| 563 | pub type BarrierEventID = ::std::os::raw::c_uint; |
| 564 | |
| 565 | #[repr (C)] |
| 566 | #[derive (Debug, Copy)] |
| 567 | pub struct XIBarrierReleasePointerInfo { |
| 568 | pub deviceid: ::std::os::raw::c_int, |
| 569 | pub barrier: PointerBarrier, |
| 570 | pub eventid: BarrierEventID, |
| 571 | } |
| 572 | impl ::std::clone::Clone for XIBarrierReleasePointerInfo { |
| 573 | fn clone(&self) -> Self { |
| 574 | *self |
| 575 | } |
| 576 | } |
| 577 | impl ::std::default::Default for XIBarrierReleasePointerInfo { |
| 578 | fn default() -> Self { |
| 579 | unsafe { ::std::mem::zeroed() } |
| 580 | } |
| 581 | } |
| 582 | |
| 583 | #[repr (C)] |
| 584 | #[derive (Debug, Copy)] |
| 585 | pub struct XIEvent { |
| 586 | pub _type: ::std::os::raw::c_int, |
| 587 | pub serial: ::std::os::raw::c_ulong, |
| 588 | pub send_event: ::std::os::raw::c_int, |
| 589 | pub display: *mut Display, |
| 590 | pub extension: ::std::os::raw::c_int, |
| 591 | pub evtype: ::std::os::raw::c_int, |
| 592 | pub time: Time, |
| 593 | } |
| 594 | impl ::std::clone::Clone for XIEvent { |
| 595 | fn clone(&self) -> Self { |
| 596 | *self |
| 597 | } |
| 598 | } |
| 599 | impl ::std::default::Default for XIEvent { |
| 600 | fn default() -> Self { |
| 601 | unsafe { ::std::mem::zeroed() } |
| 602 | } |
| 603 | } |
| 604 | |
| 605 | #[repr (C)] |
| 606 | #[derive (Debug, Copy)] |
| 607 | pub struct XIHierarchyInfo { |
| 608 | pub deviceid: ::std::os::raw::c_int, |
| 609 | pub attachment: ::std::os::raw::c_int, |
| 610 | pub _use: ::std::os::raw::c_int, |
| 611 | pub enabled: ::std::os::raw::c_int, |
| 612 | pub flags: ::std::os::raw::c_int, |
| 613 | } |
| 614 | impl ::std::clone::Clone for XIHierarchyInfo { |
| 615 | fn clone(&self) -> Self { |
| 616 | *self |
| 617 | } |
| 618 | } |
| 619 | impl ::std::default::Default for XIHierarchyInfo { |
| 620 | fn default() -> Self { |
| 621 | unsafe { ::std::mem::zeroed() } |
| 622 | } |
| 623 | } |
| 624 | |
| 625 | #[repr (C)] |
| 626 | #[derive (Debug, Copy)] |
| 627 | pub struct XIHierarchyEvent { |
| 628 | pub _type: ::std::os::raw::c_int, |
| 629 | pub serial: ::std::os::raw::c_ulong, |
| 630 | pub send_event: ::std::os::raw::c_int, |
| 631 | pub display: *mut Display, |
| 632 | pub extension: ::std::os::raw::c_int, |
| 633 | pub evtype: ::std::os::raw::c_int, |
| 634 | pub time: Time, |
| 635 | pub flags: ::std::os::raw::c_int, |
| 636 | pub num_info: ::std::os::raw::c_int, |
| 637 | pub info: *mut XIHierarchyInfo, |
| 638 | } |
| 639 | impl ::std::clone::Clone for XIHierarchyEvent { |
| 640 | fn clone(&self) -> Self { |
| 641 | *self |
| 642 | } |
| 643 | } |
| 644 | impl ::std::default::Default for XIHierarchyEvent { |
| 645 | fn default() -> Self { |
| 646 | unsafe { ::std::mem::zeroed() } |
| 647 | } |
| 648 | } |
| 649 | |
| 650 | #[repr (C)] |
| 651 | #[derive (Debug, Copy)] |
| 652 | pub struct XIDeviceChangedEvent { |
| 653 | pub _type: ::std::os::raw::c_int, |
| 654 | pub serial: ::std::os::raw::c_ulong, |
| 655 | pub send_event: ::std::os::raw::c_int, |
| 656 | pub display: *mut Display, |
| 657 | pub extension: ::std::os::raw::c_int, |
| 658 | pub evtype: ::std::os::raw::c_int, |
| 659 | pub time: Time, |
| 660 | pub deviceid: ::std::os::raw::c_int, |
| 661 | pub sourceid: ::std::os::raw::c_int, |
| 662 | pub reason: ::std::os::raw::c_int, |
| 663 | pub num_classes: ::std::os::raw::c_int, |
| 664 | pub classes: *mut *mut XIAnyClassInfo, |
| 665 | } |
| 666 | impl ::std::clone::Clone for XIDeviceChangedEvent { |
| 667 | fn clone(&self) -> Self { |
| 668 | *self |
| 669 | } |
| 670 | } |
| 671 | impl ::std::default::Default for XIDeviceChangedEvent { |
| 672 | fn default() -> Self { |
| 673 | unsafe { ::std::mem::zeroed() } |
| 674 | } |
| 675 | } |
| 676 | |
| 677 | #[repr (C)] |
| 678 | #[derive (Debug, Copy)] |
| 679 | pub struct XIDeviceEvent { |
| 680 | pub _type: ::std::os::raw::c_int, |
| 681 | pub serial: ::std::os::raw::c_ulong, |
| 682 | pub send_event: ::std::os::raw::c_int, |
| 683 | pub display: *mut Display, |
| 684 | pub extension: ::std::os::raw::c_int, |
| 685 | pub evtype: ::std::os::raw::c_int, |
| 686 | pub time: Time, |
| 687 | pub deviceid: ::std::os::raw::c_int, |
| 688 | pub sourceid: ::std::os::raw::c_int, |
| 689 | pub detail: ::std::os::raw::c_int, |
| 690 | pub root: Window, |
| 691 | pub event: Window, |
| 692 | pub child: Window, |
| 693 | pub root_x: ::std::os::raw::c_double, |
| 694 | pub root_y: ::std::os::raw::c_double, |
| 695 | pub event_x: ::std::os::raw::c_double, |
| 696 | pub event_y: ::std::os::raw::c_double, |
| 697 | pub flags: ::std::os::raw::c_int, |
| 698 | pub buttons: XIButtonState, |
| 699 | pub valuators: XIValuatorState, |
| 700 | pub mods: XIModifierState, |
| 701 | pub group: XIGroupState, |
| 702 | } |
| 703 | impl ::std::clone::Clone for XIDeviceEvent { |
| 704 | fn clone(&self) -> Self { |
| 705 | *self |
| 706 | } |
| 707 | } |
| 708 | impl ::std::default::Default for XIDeviceEvent { |
| 709 | fn default() -> Self { |
| 710 | unsafe { ::std::mem::zeroed() } |
| 711 | } |
| 712 | } |
| 713 | |
| 714 | #[repr (C)] |
| 715 | #[derive (Debug, Copy)] |
| 716 | pub struct XIRawEvent { |
| 717 | pub _type: ::std::os::raw::c_int, |
| 718 | pub serial: ::std::os::raw::c_ulong, |
| 719 | pub send_event: ::std::os::raw::c_int, |
| 720 | pub display: *mut Display, |
| 721 | pub extension: ::std::os::raw::c_int, |
| 722 | pub evtype: ::std::os::raw::c_int, |
| 723 | pub time: Time, |
| 724 | pub deviceid: ::std::os::raw::c_int, |
| 725 | pub sourceid: ::std::os::raw::c_int, |
| 726 | pub detail: ::std::os::raw::c_int, |
| 727 | pub flags: ::std::os::raw::c_int, |
| 728 | pub valuators: XIValuatorState, |
| 729 | pub raw_values: *mut ::std::os::raw::c_double, |
| 730 | } |
| 731 | impl ::std::clone::Clone for XIRawEvent { |
| 732 | fn clone(&self) -> Self { |
| 733 | *self |
| 734 | } |
| 735 | } |
| 736 | impl ::std::default::Default for XIRawEvent { |
| 737 | fn default() -> Self { |
| 738 | unsafe { ::std::mem::zeroed() } |
| 739 | } |
| 740 | } |
| 741 | |
| 742 | #[repr (C)] |
| 743 | #[derive (Debug, Copy)] |
| 744 | pub struct XIEnterEvent { |
| 745 | pub _type: ::std::os::raw::c_int, |
| 746 | pub serial: ::std::os::raw::c_ulong, |
| 747 | pub send_event: ::std::os::raw::c_int, |
| 748 | pub display: *mut Display, |
| 749 | pub extension: ::std::os::raw::c_int, |
| 750 | pub evtype: ::std::os::raw::c_int, |
| 751 | pub time: Time, |
| 752 | pub deviceid: ::std::os::raw::c_int, |
| 753 | pub sourceid: ::std::os::raw::c_int, |
| 754 | pub detail: ::std::os::raw::c_int, |
| 755 | pub root: Window, |
| 756 | pub event: Window, |
| 757 | pub child: Window, |
| 758 | pub root_x: ::std::os::raw::c_double, |
| 759 | pub root_y: ::std::os::raw::c_double, |
| 760 | pub event_x: ::std::os::raw::c_double, |
| 761 | pub event_y: ::std::os::raw::c_double, |
| 762 | pub mode: ::std::os::raw::c_int, |
| 763 | pub focus: ::std::os::raw::c_int, |
| 764 | pub same_screen: ::std::os::raw::c_int, |
| 765 | pub buttons: XIButtonState, |
| 766 | pub mods: XIModifierState, |
| 767 | pub group: XIGroupState, |
| 768 | } |
| 769 | impl ::std::clone::Clone for XIEnterEvent { |
| 770 | fn clone(&self) -> Self { |
| 771 | *self |
| 772 | } |
| 773 | } |
| 774 | impl ::std::default::Default for XIEnterEvent { |
| 775 | fn default() -> Self { |
| 776 | unsafe { ::std::mem::zeroed() } |
| 777 | } |
| 778 | } |
| 779 | |
| 780 | pub type XILeaveEvent = XIEnterEvent; |
| 781 | pub type XIFocusInEvent = XIEnterEvent; |
| 782 | pub type XIFocusOutEvent = XIEnterEvent; |
| 783 | |
| 784 | #[repr (C)] |
| 785 | #[derive (Debug, Copy)] |
| 786 | pub struct XIPropertyEvent { |
| 787 | pub _type: ::std::os::raw::c_int, |
| 788 | pub serial: ::std::os::raw::c_ulong, |
| 789 | pub send_event: ::std::os::raw::c_int, |
| 790 | pub display: *mut Display, |
| 791 | pub extension: ::std::os::raw::c_int, |
| 792 | pub evtype: ::std::os::raw::c_int, |
| 793 | pub time: Time, |
| 794 | pub deviceid: ::std::os::raw::c_int, |
| 795 | pub property: Atom, |
| 796 | pub what: ::std::os::raw::c_int, |
| 797 | } |
| 798 | impl ::std::clone::Clone for XIPropertyEvent { |
| 799 | fn clone(&self) -> Self { |
| 800 | *self |
| 801 | } |
| 802 | } |
| 803 | impl ::std::default::Default for XIPropertyEvent { |
| 804 | fn default() -> Self { |
| 805 | unsafe { ::std::mem::zeroed() } |
| 806 | } |
| 807 | } |
| 808 | |
| 809 | #[repr (C)] |
| 810 | #[derive (Debug, Copy)] |
| 811 | pub struct XITouchOwnershipEvent { |
| 812 | pub _type: ::std::os::raw::c_int, |
| 813 | pub serial: ::std::os::raw::c_ulong, |
| 814 | pub send_event: ::std::os::raw::c_int, |
| 815 | pub display: *mut Display, |
| 816 | pub extension: ::std::os::raw::c_int, |
| 817 | pub evtype: ::std::os::raw::c_int, |
| 818 | pub time: Time, |
| 819 | pub deviceid: ::std::os::raw::c_int, |
| 820 | pub sourceid: ::std::os::raw::c_int, |
| 821 | pub touchid: ::std::os::raw::c_uint, |
| 822 | pub root: Window, |
| 823 | pub event: Window, |
| 824 | pub child: Window, |
| 825 | pub flags: ::std::os::raw::c_int, |
| 826 | } |
| 827 | impl ::std::clone::Clone for XITouchOwnershipEvent { |
| 828 | fn clone(&self) -> Self { |
| 829 | *self |
| 830 | } |
| 831 | } |
| 832 | impl ::std::default::Default for XITouchOwnershipEvent { |
| 833 | fn default() -> Self { |
| 834 | unsafe { ::std::mem::zeroed() } |
| 835 | } |
| 836 | } |
| 837 | |
| 838 | #[repr (C)] |
| 839 | #[derive (Debug, Copy)] |
| 840 | pub struct XIBarrierEvent { |
| 841 | pub _type: ::std::os::raw::c_int, |
| 842 | pub serial: ::std::os::raw::c_ulong, |
| 843 | pub send_event: ::std::os::raw::c_int, |
| 844 | pub display: *mut Display, |
| 845 | pub extension: ::std::os::raw::c_int, |
| 846 | pub evtype: ::std::os::raw::c_int, |
| 847 | pub time: Time, |
| 848 | pub deviceid: ::std::os::raw::c_int, |
| 849 | pub sourceid: ::std::os::raw::c_int, |
| 850 | pub event: Window, |
| 851 | pub root: Window, |
| 852 | pub root_x: ::std::os::raw::c_double, |
| 853 | pub root_y: ::std::os::raw::c_double, |
| 854 | pub dx: ::std::os::raw::c_double, |
| 855 | pub dy: ::std::os::raw::c_double, |
| 856 | pub dtime: ::std::os::raw::c_int, |
| 857 | pub flags: ::std::os::raw::c_int, |
| 858 | pub barrier: PointerBarrier, |
| 859 | pub eventid: BarrierEventID, |
| 860 | } |
| 861 | impl ::std::clone::Clone for XIBarrierEvent { |
| 862 | fn clone(&self) -> Self { |
| 863 | *self |
| 864 | } |
| 865 | } |
| 866 | impl ::std::default::Default for XIBarrierEvent { |
| 867 | fn default() -> Self { |
| 868 | unsafe { ::std::mem::zeroed() } |
| 869 | } |
| 870 | } |
| 871 | |