x11-2.18.2/.gitignore010064400017500001750000000000101361324422500124170ustar0000000000000000/target x11-2.18.2/Cargo.toml.orig010064400017500001750000000011631361324545600133370ustar0000000000000000[package] name = "x11" version = "2.18.2" authors = [ "daggerbot ", "Erle Pereira ", ] description = "X11 library bindings for Rust" license = "MIT" repository = "https://github.com/erlepereira/x11-rs.git" build = "build.rs" documentation = "https://docs.rs/x11" workspace = ".." [features] dpms = [] glx = [] xcursor = [] xf86vmode = [] xft = [] xinerama = [] xinput = [] xlib = [] xlib_xcb = [] xmu = [] xrandr = [] xrecord = ["xtst"] xrender = [] xss = [] xt = [] xtest = ["xtst"] xtst = [] dox = [] [dependencies] libc = "0.2" [build-dependencies] pkg-config = "0.3.8" x11-2.18.2/Cargo.toml0000644000000021621361324630200076340ustar00# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're # editing this file be aware that the upstream Cargo.toml # will likely look very different (and much more reasonable) [package] name = "x11" version = "2.18.2" authors = ["daggerbot ", "Erle Pereira "] build = "build.rs" description = "X11 library bindings for Rust" documentation = "https://docs.rs/x11" license = "MIT" repository = "https://github.com/erlepereira/x11-rs.git" [dependencies.libc] version = "0.2" [build-dependencies.pkg-config] version = "0.3.8" [features] dox = [] dpms = [] glx = [] xcursor = [] xf86vmode = [] xft = [] xinerama = [] xinput = [] xlib = [] xlib_xcb = [] xmu = [] xrandr = [] xrecord = ["xtst"] xrender = [] xss = [] xt = [] xtest = ["xtst"] xtst = [] x11-2.18.2/build.rs010064400017500001750000000017571361324422500121170ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. extern crate pkg_config; use std::env; fn main () { if cfg!(feature = "dox") { return; } let deps = [ ("gl", "1", "glx"), ("x11", "1.4.99.1", "xlib"), ("x11-xcb", "1.6", "xlib_xcb"), ("xcursor", "1.1", "xcursor"), ("xext", "1.3", "dpms"), ("xft", "2.1", "xft"), ("xi", "1.7", "xinput"), ("xinerama", "1.1", "xinerama"), ("xmu", "1.1", "xmu"), ("xrandr", "1.5", "xrandr"), ("xrender", "0.9.6", "xrender"), ("xscrnsaver", "1.2", "xss"), ("xt", "1.1", "xt"), ("xtst", "1.2", "xtst"), ("xxf86vm", "1.1", "xf86vmode"), ]; for &(dep, version, feature) in deps.iter() { let var = format!( "CARGO_FEATURE_{}", feature.to_uppercase().replace('-', "_") ); if env::var_os(var).is_none() { continue; } pkg_config::Config::new().atleast_version(version).probe(dep).unwrap(); } } x11-2.18.2/examples/hello-world.rs010064400017500001750000000054011361324422500150540ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. #![cfg_attr(not(feature = "xlib"), allow(dead_code))] #![cfg_attr(not(feature = "xlib"), allow(unused_imports))] extern crate x11; use std::ffi::CString; use std::mem; use std::os::raw::*; use std::ptr; use x11::xlib; #[cfg(not(feature = "xlib"))] fn main () { panic!("this example requires `--features xlib`"); } #[cfg(feature = "xlib")] fn main () { unsafe { // Open display connection. let display = xlib::XOpenDisplay(ptr::null()); if display.is_null() { panic!("XOpenDisplay failed"); } // Create window. let screen = xlib::XDefaultScreen(display); let root = xlib::XRootWindow(display, screen); let mut attributes: xlib::XSetWindowAttributes = mem::uninitialized(); attributes.background_pixel = xlib::XWhitePixel(display, screen); let window = xlib::XCreateWindow(display, root, 0, 0, 400, 300, 0, 0, xlib::InputOutput as c_uint, ptr::null_mut(), xlib::CWBackPixel, &mut attributes); // Set window title. let title_str = CString::new("hello-world").unwrap(); xlib::XStoreName(display, window, title_str.as_ptr() as *mut c_char); // Hook close requests. let wm_protocols_str = CString::new("WM_PROTOCOLS").unwrap(); let wm_delete_window_str = CString::new("WM_DELETE_WINDOW").unwrap(); let wm_protocols = xlib::XInternAtom(display, wm_protocols_str.as_ptr(), xlib::False); let wm_delete_window = xlib::XInternAtom(display, wm_delete_window_str.as_ptr(), xlib::False); let mut protocols = [wm_delete_window]; xlib::XSetWMProtocols(display, window, protocols.as_mut_ptr(), protocols.len() as c_int); // Show window. xlib::XMapWindow(display, window); // Main loop. let mut event: xlib::XEvent = mem::uninitialized(); loop { xlib::XNextEvent(display, &mut event); match event.get_type() { xlib::ClientMessage => { let xclient = xlib::XClientMessageEvent::from(event); if xclient.message_type == wm_protocols && xclient.format == 32 { let protocol = xclient.data.get_long(0) as xlib::Atom; if protocol == wm_delete_window { break; } } }, _ => () } } // Shut down. xlib::XCloseDisplay(display); } } x11-2.18.2/examples/input.rs010064400017500001750000000331641361324422500137720ustar0000000000000000// XInput2 example for x11-rs // // This is a basic example showing how to use XInput2 to read // keyboard, mouse and other input events in X11. // // See Pete Hutterer's "XI2 Recipes" blog series, // starting at http://who-t.blogspot.co.uk/2009/05/xi2-recipes-part-1.html // for a guide. #![cfg_attr(not(feature = "xlib"), allow(dead_code))] #![cfg_attr(not(feature = "xlib"), allow(unused_imports))] extern crate x11; extern crate libc; use std::ffi::CString; use std::ptr::{ null, null_mut, }; use std::mem::{transmute, zeroed}; use std::os::raw::*; use std::slice::{from_raw_parts}; use x11::{xlib, xinput2}; /// Provides a basic framework for connecting to an X Display, /// creating a window, displaying it and running the event loop pub struct DemoWindow { pub display: *mut xlib::Display, pub window: xlib::Window, wm_protocols: xlib::Atom, wm_delete_window: xlib::Atom } impl DemoWindow { /// Create a new window with a given title and size pub fn new(title: &str, width: u32, height: u32) -> DemoWindow { unsafe { // Open display let display = xlib::XOpenDisplay(null()); if display == null_mut() { panic!("can't open display"); } // Load atoms let wm_delete_window_str = CString::new("WM_DELETE_WINDOW").unwrap(); let wm_protocols_str = CString::new("WM_PROTOCOLS").unwrap(); let wm_delete_window = xlib::XInternAtom(display, wm_delete_window_str.as_ptr(), xlib::False); let wm_protocols = xlib::XInternAtom(display, wm_protocols_str.as_ptr(), xlib::False); if wm_delete_window == 0 || wm_protocols == 0 { panic!("can't load atoms"); } // Create window let screen_num = xlib::XDefaultScreen(display); let root = xlib::XRootWindow(display, screen_num); let white_pixel = xlib::XWhitePixel(display, screen_num); let mut attributes: xlib::XSetWindowAttributes = zeroed(); attributes.background_pixel = white_pixel; let window = xlib::XCreateWindow(display, root, 0, 0, width as c_uint, height as c_uint, 0, 0, xlib::InputOutput as c_uint, null_mut(), xlib::CWBackPixel, &mut attributes); // Set window title let title_str = CString::new(title).unwrap(); xlib::XStoreName(display, window, title_str.as_ptr() as *mut _); // Subscribe to delete (close) events let mut protocols = [wm_delete_window]; if xlib::XSetWMProtocols(display, window, &mut protocols[0] as *mut xlib::Atom, 1) == xlib::False { panic!("can't set WM protocols"); } DemoWindow{ display: display, window: window, wm_protocols: wm_protocols, wm_delete_window: wm_delete_window } } } /// Display the window pub fn show(&mut self) { unsafe { xlib::XMapWindow(self.display, self.window); } } /// Process events for the window. Window close events are handled automatically, /// other events are passed on to |event_handler| pub fn run_event_loop(&mut self, mut event_handler: EventHandler) where EventHandler: FnMut(&xlib::XEvent) { let mut event: xlib::XEvent = unsafe{zeroed()}; loop { unsafe{xlib::XNextEvent(self.display, &mut event)}; match event.get_type() { xlib::ClientMessage => { let xclient: xlib::XClientMessageEvent = From::from(event); // WM_PROTOCOLS client message if xclient.message_type == self.wm_protocols && xclient.format == 32 { let protocol = xclient.data.get_long(0) as xlib::Atom; // WM_DELETE_WINDOW (close event) if protocol == self.wm_delete_window { break; } } }, _ => event_handler(&event) } } } } impl Drop for DemoWindow { /// Destroys the window and disconnects from the display fn drop(&mut self) { unsafe { xlib::XDestroyWindow(self.display, self.window); xlib::XCloseDisplay(self.display); } } } const TITLE: &'static str = "XInput Demo"; const DEFAULT_WIDTH: c_uint = 640; const DEFAULT_HEIGHT: c_uint = 480; #[derive(Debug)] enum AxisType { HorizontalScroll, VerticalScroll, Other } #[derive(Debug)] struct Axis { id: i32, device_id: i32, axis_number: i32, axis_type: AxisType } #[derive(Debug)] struct AxisValue { device_id: i32, axis_number: i32, value: f64 } struct InputState { cursor_pos: (f64, f64), axis_values: Vec } fn read_input_axis_info(display: *mut xlib::Display) -> Vec { let mut axis_list = Vec::new(); let mut device_count = 0; // only get events from the master devices which are 'attached' // to the keyboard or cursor let devices = unsafe{xinput2::XIQueryDevice(display, xinput2::XIAllMasterDevices, &mut device_count)}; for i in 0..device_count { let device = unsafe { *(devices.offset(i as isize)) }; for k in 0..device.num_classes { let class = unsafe { *(device.classes.offset(k as isize)) }; match unsafe { (*class)._type } { xinput2::XIScrollClass => { let scroll_class: &xinput2::XIScrollClassInfo = unsafe{transmute(class)}; axis_list.push(Axis{ id: scroll_class.sourceid, device_id: device.deviceid, axis_number: scroll_class.number, axis_type: match scroll_class.scroll_type { xinput2::XIScrollTypeHorizontal => AxisType::HorizontalScroll, xinput2::XIScrollTypeVertical => AxisType::VerticalScroll, _ => { unreachable!() } } }) }, xinput2::XIValuatorClass => { let valuator_class: &xinput2::XIValuatorClassInfo = unsafe{transmute(class)}; axis_list.push(Axis{ id: valuator_class.sourceid, device_id: device.deviceid, axis_number: valuator_class.number, axis_type: AxisType::Other }) }, _ => { /* TODO */ } } } } axis_list.sort_by(|a, b| { if a.device_id != b.device_id { a.device_id.cmp(&b.device_id) } else if a.id != b.id { a.id.cmp(&b.id) } else { a.axis_number.cmp(&b.axis_number) } }); axis_list } /// Given an input motion event for an axis and the previous /// state of the axises, return the horizontal/vertical /// scroll deltas fn calc_scroll_deltas(event: &xinput2::XIDeviceEvent, axis_id: i32, axis_value: f64, axis_list: &[Axis], prev_axis_values: &mut Vec) -> (f64, f64) { let prev_value_pos = prev_axis_values.iter().position(|prev_axis| { prev_axis.device_id == event.sourceid && prev_axis.axis_number == axis_id }); let delta = match prev_value_pos { Some(idx) => axis_value - prev_axis_values[idx].value, None => 0.0 }; let new_axis_value = AxisValue{ device_id: event.sourceid, axis_number: axis_id, value: axis_value }; match prev_value_pos { Some(idx) => prev_axis_values[idx] = new_axis_value, None => prev_axis_values.push(new_axis_value) } let mut scroll_delta = (0.0, 0.0); for axis in axis_list.iter() { if axis.id == event.sourceid && axis.axis_number == axis_id { match axis.axis_type { AxisType::HorizontalScroll => scroll_delta.0 = delta, AxisType::VerticalScroll => scroll_delta.1 = delta, _ => {} } } } scroll_delta } #[cfg(not(all(feature = "xlib", feature = "xinput")))] fn main () { panic!("this example requires `--features 'xlib xinput'`"); } #[cfg(all(feature = "xlib", feature = "xinput"))] fn main () { let mut demo_window = DemoWindow::new(TITLE, DEFAULT_WIDTH, DEFAULT_HEIGHT); // query XInput support let mut opcode: c_int = 0; let mut event: c_int = 0; let mut error: c_int = 0; let xinput_str = CString::new("XInputExtension").unwrap(); let xinput_available = unsafe { xlib::XQueryExtension(demo_window.display, xinput_str.as_ptr(), &mut opcode, &mut event, &mut error) }; if xinput_available == xlib::False { panic!("XInput not available") } let mut xinput_major_ver = xinput2::XI_2_Major; let mut xinput_minor_ver = xinput2::XI_2_Minor; if unsafe{xinput2::XIQueryVersion(demo_window.display, &mut xinput_major_ver, &mut xinput_minor_ver)} != xlib::Success as c_int { panic!("XInput2 not available"); } println!("XI version available {}.{}", xinput_major_ver, xinput_minor_ver); // init XInput events let mut mask: [c_uchar; 1] = [0]; let mut input_event_mask = xinput2::XIEventMask { deviceid: xinput2::XIAllMasterDevices, mask_len: mask.len() as i32, mask: mask.as_mut_ptr() }; let events = &[ xinput2::XI_ButtonPress, xinput2::XI_ButtonRelease, xinput2::XI_KeyPress, xinput2::XI_KeyRelease, xinput2::XI_Motion ]; for &event in events { xinput2::XISetMask(&mut mask, event); } match unsafe{xinput2::XISelectEvents(demo_window.display, demo_window.window, &mut input_event_mask, 1)} { status if status as u8 == xlib::Success => (), err => panic!("Failed to select events {:?}", err) } // Show window demo_window.show(); // Main loop let display = demo_window.display; let axis_list = read_input_axis_info(display); let mut prev_state = InputState{ cursor_pos: (0.0, 0.0), axis_values: Vec::new() }; demo_window.run_event_loop(|event| { match event.get_type() { xlib::GenericEvent => { let mut cookie: xlib::XGenericEventCookie = From::from(*event); if unsafe{xlib::XGetEventData(display, &mut cookie)} != xlib::True { println!("Failed to retrieve event data"); return; } match cookie.evtype { xinput2::XI_KeyPress | xinput2::XI_KeyRelease => { let event_data: &xinput2::XIDeviceEvent = unsafe{transmute(cookie.data)}; if cookie.evtype == xinput2::XI_KeyPress { if event_data.flags & xinput2::XIKeyRepeat == 0 { println!("Key {} pressed", event_data.detail); } } else { println!("Key {} released", event_data.detail); } }, xinput2::XI_ButtonPress | xinput2::XI_ButtonRelease => { let event_data: &xinput2::XIDeviceEvent = unsafe{transmute(cookie.data)}; if cookie.evtype == xinput2::XI_ButtonPress { println!("Button {} pressed", event_data.detail); } else { println!("Button {} released", event_data.detail); } }, xinput2::XI_Motion => { let event_data: &xinput2::XIDeviceEvent = unsafe{transmute(cookie.data)}; let axis_state = event_data.valuators; let mask = unsafe{ from_raw_parts(axis_state.mask, axis_state.mask_len as usize) }; let mut axis_count = 0; let mut scroll_delta = (0.0, 0.0); for axis_id in 0..axis_state.mask_len { if xinput2::XIMaskIsSet(&mask, axis_id) { let axis_value = unsafe{*axis_state.values.offset(axis_count)}; let delta = calc_scroll_deltas(event_data, axis_id, axis_value, &axis_list, &mut prev_state.axis_values); scroll_delta.0 += delta.0; scroll_delta.1 += delta.1; axis_count += 1; } } if scroll_delta.0.abs() > 0.0 || scroll_delta.1.abs() > 0.0 { println!("Mouse wheel/trackpad scrolled by ({}, {})", scroll_delta.0, scroll_delta.1); } let new_cursor_pos = (event_data.event_x, event_data.event_y); if new_cursor_pos != prev_state.cursor_pos { println!("Mouse moved to ({}, {})", new_cursor_pos.0, new_cursor_pos.1); prev_state.cursor_pos = new_cursor_pos; } }, _ => () } unsafe{xlib::XFreeEventData(display, &mut cookie)}; }, _ => () } }); } x11-2.18.2/examples/xrecord.rs010064400017500001750000000063031361324422500142740ustar0000000000000000// Example for X Record Extension #![cfg_attr(not(feature = "xlib"), allow(dead_code))] #![cfg_attr(not(feature = "xlib"), allow(unused_imports))] extern crate libc; extern crate x11; use std::ffi::CString; use std::ptr::{ null, null_mut, }; use std::os::raw::{ c_int }; use x11::xlib; use x11::xrecord; static mut EVENT_COUNT:u32 = 0; #[cfg(not(all(feature = "xlib", feature = "xrecord")))] fn main () { panic!("this example requires `--features 'xlib xrecord'`"); } #[cfg(all(feature = "xlib", feature = "xrecord"))] fn main () { unsafe { // Open displays let dpy_control = xlib::XOpenDisplay(null()); let dpy_data = xlib::XOpenDisplay(null()); if dpy_control == null_mut() || dpy_data == null_mut() { panic!("can't open display"); } // Enable synchronization xlib::XSynchronize(dpy_control, 1); let extension_name = CString::new("RECORD").unwrap(); let extension = xlib::XInitExtension( dpy_control, extension_name.as_ptr()); if extension.is_null() { panic!("Error init X Record Extension"); } // Get version let mut version_major: c_int = 0; let mut version_minor: c_int = 0; xrecord::XRecordQueryVersion( dpy_control, &mut version_major, &mut version_minor ); println!( "RECORD extension version {}.{}", version_major, version_minor ); // Prepare record range let mut record_range: xrecord::XRecordRange = *xrecord::XRecordAllocRange(); record_range.device_events.first = xlib::KeyPress as u8; record_range.device_events.last = xlib::MotionNotify as u8; // Create context let context = xrecord::XRecordCreateContext( dpy_control, 0, &mut xrecord::XRecordAllClients, 1, std::mem::transmute(&mut &mut record_range), 1 ); if context == 0 { panic!("Fail create Record context\n"); } // Run let result = xrecord::XRecordEnableContext( dpy_data, context, Some(record_callback), &mut 0 ); if result == 0 { panic!("Cound not enable the Record context!\n"); } } } unsafe extern "C" fn record_callback(_:*mut i8, raw_data: *mut xrecord::XRecordInterceptData) { EVENT_COUNT += 1; let data = &*raw_data; // Skip server events if data.category != xrecord::XRecordFromServer { return; } // Cast binary data let xdatum = &*(data.data as *mut XRecordDatum); let event_type = match xdatum.xtype as i32 { xlib::KeyPress => "KeyPress", xlib::KeyRelease => "KeyRelease", xlib::ButtonPress => "ButtonPress", xlib::ButtonRelease => "ButtonRelease", xlib::MotionNotify => "MotionNotify", _ => "Other" }; println!("Event recieve\t{:?}\tevent.", event_type); xrecord::XRecordFreeData(raw_data); } #[repr(C)] struct XRecordDatum { xtype: u8, code: u8, unknown1: u8, unknown2: u8 } x11-2.18.2/src/dpms.rs010064400017500001750000000024271361324422500125450ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::{ c_int }; use xlib::{ Display, Status, Bool }; use xmd::{ CARD16, BOOL }; // // functions // x11_link! { Xext, xext, ["libXext.so.6", "libXext.so"], 9, pub fn DPMSQueryExtension (_1: *mut Display, _2: *mut c_int, _3: *mut c_int) -> Bool, pub fn DPMSGetVersion (_1: *mut Display, _2: *mut c_int, _3: *mut c_int) -> Status, pub fn DPMSCapable (_1: *mut Display) -> Bool, pub fn DPMSSetTimeouts (_1: *mut Display, _2: CARD16, _3: CARD16, _4: CARD16) -> Status, pub fn DPMSGetTimeouts (_1: *mut Display, _2: *mut CARD16, _3: *mut CARD16, _4: *mut CARD16) -> Bool, pub fn DPMSEnable (_1: *mut Display) -> Status, pub fn DPMSDisable (_1: *mut Display) -> Status, pub fn DPMSForceLevel (_1: *mut Display, _2: CARD16) -> Status, pub fn DPMSInfo (_1: *mut Display, _2: *mut CARD16, _3: *mut BOOL) -> Status, variadic: globals: } // // constants // pub const DPMSMajorVersion: c_int = 1; pub const DPMSMinorVersion: c_int = 1; pub const DPMSExtensionName: &'static str = "DPMS"; pub const DPMSModeOn: CARD16 = 0; pub const DPMSModeStandby: CARD16 = 1; pub const DPMSModeSuspend: CARD16 = 2; pub const DPMSModeOff: CARD16 = 3; x11-2.18.2/src/glx.rs010064400017500001750000000213051361324422500123700ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::{ c_char, c_int, c_uchar, c_uint, c_ulong, }; use ::xlib::{ Display, XID, XVisualInfo, }; // // functions // x11_link! { Glx, gl, ["libGL.so.1", "libGL.so"], 40, pub fn glXChooseFBConfig (_4: *mut Display, _3: c_int, _2: *const c_int, _1: *mut c_int) -> *mut GLXFBConfig, pub fn glXChooseVisual (_3: *mut Display, _2: c_int, _1: *mut c_int) -> *mut XVisualInfo, pub fn glXCopyContext (_4: *mut Display, _3: GLXContext, _2: GLXContext, _1: c_ulong) -> (), pub fn glXCreateContext (_4: *mut Display, _3: *mut XVisualInfo, _2: GLXContext, _1: c_int) -> GLXContext, pub fn glXCreateGLXPixmap (_3: *mut Display, _2: *mut XVisualInfo, _1: c_ulong) -> c_ulong, pub fn glXCreateNewContext (_5: *mut Display, _4: GLXFBConfig, _3: c_int, _2: GLXContext, _1: c_int) -> GLXContext, pub fn glXCreatePbuffer (_3: *mut Display, _2: GLXFBConfig, _1: *const c_int) -> c_ulong, pub fn glXCreatePixmap (_4: *mut Display, _3: GLXFBConfig, _2: c_ulong, _1: *const c_int) -> c_ulong, pub fn glXCreateWindow (_4: *mut Display, _3: GLXFBConfig, _2: c_ulong, _1: *const c_int) -> c_ulong, pub fn glXDestroyContext (_2: *mut Display, _1: GLXContext) -> (), pub fn glXDestroyGLXPixmap (_2: *mut Display, _1: c_ulong) -> (), pub fn glXDestroyPbuffer (_2: *mut Display, _1: c_ulong) -> (), pub fn glXDestroyPixmap (_2: *mut Display, _1: c_ulong) -> (), pub fn glXDestroyWindow (_2: *mut Display, _1: c_ulong) -> (), pub fn glXGetClientString (_2: *mut Display, _1: c_int) -> *const c_char, pub fn glXGetConfig (_4: *mut Display, _3: *mut XVisualInfo, _2: c_int, _1: *mut c_int) -> c_int, pub fn glXGetCurrentContext () -> GLXContext, pub fn glXGetCurrentDisplay () -> *mut Display, pub fn glXGetCurrentDrawable () -> c_ulong, pub fn glXGetCurrentReadDrawable () -> c_ulong, pub fn glXGetFBConfigAttrib (_4: *mut Display, _3: GLXFBConfig, _2: c_int, _1: *mut c_int) -> c_int, pub fn glXGetFBConfigs (_3: *mut Display, _2: c_int, _1: *mut c_int) -> *mut GLXFBConfig, pub fn glXGetProcAddress (_1: *const c_uchar) -> Option, pub fn glXGetProcAddressARB (_1: *const c_uchar) -> Option, pub fn glXGetSelectedEvent (_3: *mut Display, _2: c_ulong, _1: *mut c_ulong) -> (), pub fn glXGetVisualFromFBConfig (_2: *mut Display, _1: GLXFBConfig) -> *mut XVisualInfo, pub fn glXIsDirect (_2: *mut Display, _1: GLXContext) -> c_int, pub fn glXMakeContextCurrent (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: GLXContext) -> c_int, pub fn glXMakeCurrent (_3: *mut Display, _2: c_ulong, _1: GLXContext) -> c_int, pub fn glXQueryContext (_4: *mut Display, _3: GLXContext, _2: c_int, _1: *mut c_int) -> c_int, pub fn glXQueryDrawable (_4: *mut Display, _3: c_ulong, _2: c_int, _1: *mut c_uint) -> (), pub fn glXQueryExtension (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn glXQueryExtensionsString (_2: *mut Display, _1: c_int) -> *const c_char, pub fn glXQueryServerString (_3: *mut Display, _2: c_int, _1: c_int) -> *const c_char, pub fn glXQueryVersion (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn glXSelectEvent (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> (), pub fn glXSwapBuffers (_2: *mut Display, _1: c_ulong) -> (), pub fn glXUseXFont (_4: c_ulong, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn glXWaitGL () -> (), pub fn glXWaitX () -> (), variadic: globals: } // // types // // opaque structures #[repr(C)] pub struct __GLXcontextRec; #[repr(C)] pub struct __GLXFBConfigRec; // types pub type GLXContext = *mut __GLXcontextRec; pub type GLXContextID = XID; pub type GLXDrawable = XID; pub type GLXFBConfig = *mut __GLXFBConfigRec; pub type GLXFBConfigID = XID; pub type GLXPbuffer = XID; pub type GLXPixmap = XID; pub type GLXWindow = XID; // // constants // // config caveats pub const GLX_SLOW_CONFIG: c_int = 0x8001; pub const GLX_NON_CONFORMANT_CONFIG: c_int = 0x800d; // drawable type mask pub const GLX_WINDOW_BIT: c_int = 0x0001; pub const GLX_PIXMAP_BIT: c_int = 0x0002; pub const GLX_PBUFFER_BIT: c_int = 0x0004; // framebuffer attributes pub const GLX_USE_GL: c_int = 0x0001; pub const GLX_BUFFER_SIZE: c_int = 0x0002; pub const GLX_LEVEL: c_int = 0x0003; pub const GLX_RGBA: c_int = 0x0004; pub const GLX_DOUBLEBUFFER: c_int = 0x0005; pub const GLX_STEREO: c_int = 0x0006; pub const GLX_AUX_BUFFERS: c_int = 0x0007; pub const GLX_RED_SIZE: c_int = 0x0008; pub const GLX_GREEN_SIZE: c_int = 0x0009; pub const GLX_BLUE_SIZE: c_int = 0x000a; pub const GLX_ALPHA_SIZE: c_int = 0x000b; pub const GLX_DEPTH_SIZE: c_int = 0x000c; pub const GLX_STENCIL_SIZE: c_int = 0x000d; pub const GLX_ACCUM_RED_SIZE: c_int = 0x000e; pub const GLX_ACCUM_GREEN_SIZE: c_int = 0x000f; pub const GLX_ACCUM_BLUE_SIZE: c_int = 0x0010; pub const GLX_ACCUM_ALPHA_SIZE: c_int = 0x0011; pub const GLX_CONFIG_CAVEAT: c_int = 0x0020; pub const GLX_X_VISUAL_TYPE: c_int = 0x0022; pub const GLX_TRANSPARENT_TYPE: c_int = 0x0023; pub const GLX_TRANSPARENT_INDEX_VALUE: c_int = 0x0024; pub const GLX_TRANSPARENT_RED_VALUE: c_int = 0x0025; pub const GLX_TRANSPARENT_GREEN_VALUE: c_int = 0x0026; pub const GLX_TRANSPARENT_BLUE_VALUE: c_int = 0x0027; pub const GLX_TRANSPARENT_ALPHA_VALUE: c_int = 0x0028; pub const GLX_VISUAL_ID: c_int = 0x800B; pub const GLX_SCREEN: c_int = 0x800C; pub const GLX_DRAWABLE_TYPE: c_int = 0x8010; pub const GLX_RENDER_TYPE: c_int = 0x8011; pub const GLX_X_RENDERABLE: c_int = 0x8012; pub const GLX_FBCONFIG_ID: c_int = 0x8013; pub const GLX_MAX_PBUFFER_WIDTH: c_int = 0x8016; pub const GLX_MAX_PBUFFER_HEIGHT: c_int = 0x8017; pub const GLX_MAX_PBUFFER_PIXELS: c_int = 0x8018; pub const GLX_SAMPLE_BUFFERS: c_int = 0x1_86a0; pub const GLX_SAMPLES: c_int = 0x1_86a1; // misc pub const GLX_DONT_CARE: c_int = -1; pub const GLX_NONE: c_int = 0x8000; // render type mask pub const GLX_RGBA_BIT: c_int = 0x0001; pub const GLX_COLOR_INDEX_BIT: c_int = 0x0002; // transparent types pub const GLX_TRANSPARENT_RGB: c_int = 0x8008; pub const GLX_TRANSPARENT_INDEX: c_int = 0x8009; // visual types pub const GLX_TRUE_COLOR: c_int = 0x8002; pub const GLX_DIRECT_COLOR: c_int = 0x8003; pub const GLX_PSEUDO_COLOR: c_int = 0x8004; pub const GLX_STATIC_COLOR: c_int = 0x8005; pub const GLX_GRAY_SCALE: c_int = 0x8006; pub const GLX_STATIC_GRAY: c_int = 0x8007; // glXGetConfig errors pub const GLX_BAD_SCREEN: c_int = 1; pub const GLX_BAD_ATTRIBUTE: c_int = 2; pub const GLX_NO_EXTENSION: c_int = 3; pub const GLX_BAD_VISUAL: c_int = 4; pub const GLX_BAD_CONTEXT: c_int = 5; pub const GLX_BAD_VALUE: c_int = 6; pub const GLX_BAD_ENUM: c_int = 7; // glXGetClientString names pub const GLX_VENDOR: c_int = 1; pub const GLX_VERSION: c_int = 2; pub const GLX_EXTENSIONS: c_int = 3; // drawable type mask? pub const GLX_FRONT_LEFT_BUFFER_BIT: c_uint = 0x0001; pub const GLX_FRONT_RIGHT_BUFFER_BIT: c_uint = 0x0002; pub const GLX_BACK_LEFT_BUFFER_BIT: c_uint = 0x0004; pub const GLX_BACK_RIGHT_BUFFER_BIT: c_uint = 0x0008; pub const GLX_AUX_BUFFERS_BIT: c_uint = 0x0010; pub const GLX_DEPTH_BUFFER_BIT: c_uint = 0x0020; pub const GLX_STENCIL_BUFFER_BIT: c_uint = 0x0040; pub const GLX_ACCUM_BUFFER_BIT: c_uint = 0080; // render type for glXCreateNewContext pub const GLX_RGBA_TYPE: c_int = 0x8014; pub const GLX_COLOR_INDEX_TYPE: c_int = 0x8015; // drawable attributes pub const GLX_PRESERVED_CONTENTS: c_int = 0x801B; pub const GLX_LARGEST_PBUFFER: c_int = 0x801C; pub const GLX_WIDTH: c_int = 0x801D; pub const GLX_HEIGHT: c_int = 0x801E; pub const GLX_PBUFFER_HEIGHT: c_int = 0x8040; pub const GLX_PBUFFER_WIDTH: c_int = 0x8041; // other? pub const GLX_EVENT_MASK: c_int = 0x801F; // event mask pub const GLX_PBUFFER_CLOBBER_MASK: c_ulong = 0x0800_0000; // event types pub const GLX_DAMAGED: c_int = 0x8020; pub const GLX_SAVED: c_int = 0x8021; // drawable types pub const GLX_WINDOW: c_int = 0x8022; pub const GLX_PBUFFER: c_int = 0x8023; // // ARB extensions // pub mod arb { use std::os::raw::c_int; // context attributes pub const GLX_CONTEXT_MAJOR_VERSION_ARB: c_int = 0x2091; pub const GLX_CONTEXT_MINOR_VERSION_ARB: c_int = 0x2092; pub const GLX_CONTEXT_FLAGS_ARB: c_int = 0x2094; pub const GLX_CONTEXT_PROFILE_MASK_ARB: c_int = 0x9126; // context flags pub const GLX_CONTEXT_DEBUG_BIT_ARB: c_int = 0x0001; pub const GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB: c_int = 0x0002; // context profile mask pub const GLX_CONTEXT_CORE_PROFILE_BIT_ARB: c_int = 0x0001; pub const GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB: c_int = 0x0002; } // // EXT extensions // pub mod ext { use std::os::raw::c_int; // drawable attributes pub const GLX_SWAP_INTERVAL_EXT: c_int = 0x20f1; pub const GLX_MAX_SWAP_INTERVAL_EXT: c_int = 0x20f2; } x11-2.18.2/src/internal.rs010064400017500001750000000015101361324422500134060ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::cmp::min; use std::mem::{ size_of, zeroed, }; // // public functions // pub unsafe fn mem_eq (a: &T, b: &T) -> bool { let a_addr = a as *const T as usize; let b_addr = b as *const T as usize; for i in 0..size_of::() { if *((a_addr + i) as *const u8) != *((b_addr + i) as *const u8) { return false; } } return true; } pub unsafe fn transmute_union (input: &I) -> O where I : Sized, O : Sized { let mut output: O = zeroed(); let copy_len = min(size_of::(), size_of::()); for i in 0..copy_len { *((&mut output as *mut O as usize + i) as *mut u8) = *((input as *const I as usize + i) as *const u8); } return output; } x11-2.18.2/src/keysym.rs010064400017500001750000001533151361324422500131260ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::c_uint; pub const XK_BackSpace: c_uint = 0xFF08; pub const XK_Tab: c_uint = 0xFF09; pub const XK_Linefeed: c_uint = 0xFF0A; pub const XK_Clear: c_uint = 0xFF0B; pub const XK_Return: c_uint = 0xFF0D; pub const XK_Pause: c_uint = 0xFF13; pub const XK_Scroll_Lock: c_uint = 0xFF14; pub const XK_Sys_Req: c_uint = 0xFF15; pub const XK_Escape: c_uint = 0xFF1B; pub const XK_Delete: c_uint = 0xFFFF; pub const XK_Multi_key: c_uint = 0xFF20; pub const XK_Kanji: c_uint = 0xFF21; pub const XK_Muhenkan: c_uint = 0xFF22; pub const XK_Henkan_Mode: c_uint = 0xFF23; pub const XK_Henkan: c_uint = 0xFF23; pub const XK_Romaji: c_uint = 0xFF24; pub const XK_Hiragana: c_uint = 0xFF25; pub const XK_Katakana: c_uint = 0xFF26; pub const XK_Hiragana_Katakana: c_uint = 0xFF27; pub const XK_Zenkaku: c_uint = 0xFF28; pub const XK_Hankaku: c_uint = 0xFF29; pub const XK_Zenkaku_Hankaku: c_uint = 0xFF2A; pub const XK_Touroku: c_uint = 0xFF2B; pub const XK_Massyo: c_uint = 0xFF2C; pub const XK_Kana_Lock: c_uint = 0xFF2D; pub const XK_Kana_Shift: c_uint = 0xFF2E; pub const XK_Eisu_Shift: c_uint = 0xFF2F; pub const XK_Eisu_toggle: c_uint = 0xFF30; pub const XK_Home: c_uint = 0xFF50; pub const XK_Left: c_uint = 0xFF51; pub const XK_Up: c_uint = 0xFF52; pub const XK_Right: c_uint = 0xFF53; pub const XK_Down: c_uint = 0xFF54; pub const XK_Prior: c_uint = 0xFF55; pub const XK_Page_Up: c_uint = 0xFF55; pub const XK_Next: c_uint = 0xFF56; pub const XK_Page_Down: c_uint = 0xFF56; pub const XK_End: c_uint = 0xFF57; pub const XK_Begin: c_uint = 0xFF58; pub const XK_Win_L: c_uint = 0xFF5B; pub const XK_Win_R: c_uint = 0xFF5C; pub const XK_App: c_uint = 0xFF5D; pub const XK_Select: c_uint = 0xFF60; pub const XK_Print: c_uint = 0xFF61; pub const XK_Execute: c_uint = 0xFF62; pub const XK_Insert: c_uint = 0xFF63; pub const XK_Undo: c_uint = 0xFF65; pub const XK_Redo: c_uint = 0xFF66; pub const XK_Menu: c_uint = 0xFF67; pub const XK_Find: c_uint = 0xFF68; pub const XK_Cancel: c_uint = 0xFF69; pub const XK_Help: c_uint = 0xFF6A; pub const XK_Break: c_uint = 0xFF6B; pub const XK_Mode_switch: c_uint = 0xFF7E; pub const XK_script_switch: c_uint = 0xFF7E; pub const XK_Num_Lock: c_uint = 0xFF7F; pub const XK_KP_Space: c_uint = 0xFF80; pub const XK_KP_Tab: c_uint = 0xFF89; pub const XK_KP_Enter: c_uint = 0xFF8D; pub const XK_KP_F1: c_uint = 0xFF91; pub const XK_KP_F2: c_uint = 0xFF92; pub const XK_KP_F3: c_uint = 0xFF93; pub const XK_KP_F4: c_uint = 0xFF94; pub const XK_KP_Home: c_uint = 0xFF95; pub const XK_KP_Left: c_uint = 0xFF96; pub const XK_KP_Up: c_uint = 0xFF97; pub const XK_KP_Right: c_uint = 0xFF98; pub const XK_KP_Down: c_uint = 0xFF99; pub const XK_KP_Prior: c_uint = 0xFF9A; pub const XK_KP_Page_Up: c_uint = 0xFF9A; pub const XK_KP_Next: c_uint = 0xFF9B; pub const XK_KP_Page_Down: c_uint = 0xFF9B; pub const XK_KP_End: c_uint = 0xFF9C; pub const XK_KP_Begin: c_uint = 0xFF9D; pub const XK_KP_Insert: c_uint = 0xFF9E; pub const XK_KP_Delete: c_uint = 0xFF9F; pub const XK_KP_Equal: c_uint = 0xFFBD; pub const XK_KP_Multiply: c_uint = 0xFFAA; pub const XK_KP_Add: c_uint = 0xFFAB; pub const XK_KP_Separator: c_uint = 0xFFAC; pub const XK_KP_Subtract: c_uint = 0xFFAD; pub const XK_KP_Decimal: c_uint = 0xFFAE; pub const XK_KP_Divide: c_uint = 0xFFAF; pub const XK_KP_0: c_uint = 0xFFB0; pub const XK_KP_1: c_uint = 0xFFB1; pub const XK_KP_2: c_uint = 0xFFB2; pub const XK_KP_3: c_uint = 0xFFB3; pub const XK_KP_4: c_uint = 0xFFB4; pub const XK_KP_5: c_uint = 0xFFB5; pub const XK_KP_6: c_uint = 0xFFB6; pub const XK_KP_7: c_uint = 0xFFB7; pub const XK_KP_8: c_uint = 0xFFB8; pub const XK_KP_9: c_uint = 0xFFB9; pub const XK_F1: c_uint = 0xFFBE; pub const XK_F2: c_uint = 0xFFBF; pub const XK_F3: c_uint = 0xFFC0; pub const XK_F4: c_uint = 0xFFC1; pub const XK_F5: c_uint = 0xFFC2; pub const XK_F6: c_uint = 0xFFC3; pub const XK_F7: c_uint = 0xFFC4; pub const XK_F8: c_uint = 0xFFC5; pub const XK_F9: c_uint = 0xFFC6; pub const XK_F10: c_uint = 0xFFC7; pub const XK_F11: c_uint = 0xFFC8; pub const XK_L1: c_uint = 0xFFC8; pub const XK_F12: c_uint = 0xFFC9; pub const XK_L2: c_uint = 0xFFC9; pub const XK_F13: c_uint = 0xFFCA; pub const XK_L3: c_uint = 0xFFCA; pub const XK_F14: c_uint = 0xFFCB; pub const XK_L4: c_uint = 0xFFCB; pub const XK_F15: c_uint = 0xFFCC; pub const XK_L5: c_uint = 0xFFCC; pub const XK_F16: c_uint = 0xFFCD; pub const XK_L6: c_uint = 0xFFCD; pub const XK_F17: c_uint = 0xFFCE; pub const XK_L7: c_uint = 0xFFCE; pub const XK_F18: c_uint = 0xFFCF; pub const XK_L8: c_uint = 0xFFCF; pub const XK_F19: c_uint = 0xFFD0; pub const XK_L9: c_uint = 0xFFD0; pub const XK_F20: c_uint = 0xFFD1; pub const XK_L10: c_uint = 0xFFD1; pub const XK_F21: c_uint = 0xFFD2; pub const XK_R1: c_uint = 0xFFD2; pub const XK_F22: c_uint = 0xFFD3; pub const XK_R2: c_uint = 0xFFD3; pub const XK_F23: c_uint = 0xFFD4; pub const XK_R3: c_uint = 0xFFD4; pub const XK_F24: c_uint = 0xFFD5; pub const XK_R4: c_uint = 0xFFD5; pub const XK_F25: c_uint = 0xFFD6; pub const XK_R5: c_uint = 0xFFD6; pub const XK_F26: c_uint = 0xFFD7; pub const XK_R6: c_uint = 0xFFD7; pub const XK_F27: c_uint = 0xFFD8; pub const XK_R7: c_uint = 0xFFD8; pub const XK_F28: c_uint = 0xFFD9; pub const XK_R8: c_uint = 0xFFD9; pub const XK_F29: c_uint = 0xFFDA; pub const XK_R9: c_uint = 0xFFDA; pub const XK_F30: c_uint = 0xFFDB; pub const XK_R10: c_uint = 0xFFDB; pub const XK_F31: c_uint = 0xFFDC; pub const XK_R11: c_uint = 0xFFDC; pub const XK_F32: c_uint = 0xFFDD; pub const XK_R12: c_uint = 0xFFDD; pub const XK_F33: c_uint = 0xFFDE; pub const XK_R13: c_uint = 0xFFDE; pub const XK_F34: c_uint = 0xFFDF; pub const XK_R14: c_uint = 0xFFDF; pub const XK_F35: c_uint = 0xFFE0; pub const XK_R15: c_uint = 0xFFE0; pub const XK_Shift_L: c_uint = 0xFFE1; pub const XK_Shift_R: c_uint = 0xFFE2; pub const XK_Control_L: c_uint = 0xFFE3; pub const XK_Control_R: c_uint = 0xFFE4; pub const XK_Caps_Lock: c_uint = 0xFFE5; pub const XK_Shift_Lock: c_uint = 0xFFE6; pub const XK_Meta_L: c_uint = 0xFFE7; pub const XK_Meta_R: c_uint = 0xFFE8; pub const XK_Alt_L: c_uint = 0xFFE9; pub const XK_Alt_R: c_uint = 0xFFEA; pub const XK_Super_L: c_uint = 0xFFEB; pub const XK_Super_R: c_uint = 0xFFEC; pub const XK_Hyper_L: c_uint = 0xFFED; pub const XK_Hyper_R: c_uint = 0xFFEE; pub const XK_space: c_uint = 0x020; pub const XK_exclam: c_uint = 0x021; pub const XK_quotedbl: c_uint = 0x022; pub const XK_numbersign: c_uint = 0x023; pub const XK_dollar: c_uint = 0x024; pub const XK_percent: c_uint = 0x025; pub const XK_ampersand: c_uint = 0x026; pub const XK_apostrophe: c_uint = 0x027; pub const XK_quoteright: c_uint = 0x027; pub const XK_parenleft: c_uint = 0x028; pub const XK_parenright: c_uint = 0x029; pub const XK_asterisk: c_uint = 0x02a; pub const XK_plus: c_uint = 0x02b; pub const XK_comma: c_uint = 0x02c; pub const XK_minus: c_uint = 0x02d; pub const XK_period: c_uint = 0x02e; pub const XK_slash: c_uint = 0x02f; pub const XK_0: c_uint = 0x030; pub const XK_1: c_uint = 0x031; pub const XK_2: c_uint = 0x032; pub const XK_3: c_uint = 0x033; pub const XK_4: c_uint = 0x034; pub const XK_5: c_uint = 0x035; pub const XK_6: c_uint = 0x036; pub const XK_7: c_uint = 0x037; pub const XK_8: c_uint = 0x038; pub const XK_9: c_uint = 0x039; pub const XK_colon: c_uint = 0x03a; pub const XK_semicolon: c_uint = 0x03b; pub const XK_less: c_uint = 0x03c; pub const XK_equal: c_uint = 0x03d; pub const XK_greater: c_uint = 0x03e; pub const XK_question: c_uint = 0x03f; pub const XK_at: c_uint = 0x040; pub const XK_A: c_uint = 0x041; pub const XK_B: c_uint = 0x042; pub const XK_C: c_uint = 0x043; pub const XK_D: c_uint = 0x044; pub const XK_E: c_uint = 0x045; pub const XK_F: c_uint = 0x046; pub const XK_G: c_uint = 0x047; pub const XK_H: c_uint = 0x048; pub const XK_I: c_uint = 0x049; pub const XK_J: c_uint = 0x04a; pub const XK_K: c_uint = 0x04b; pub const XK_L: c_uint = 0x04c; pub const XK_M: c_uint = 0x04d; pub const XK_N: c_uint = 0x04e; pub const XK_O: c_uint = 0x04f; pub const XK_P: c_uint = 0x050; pub const XK_Q: c_uint = 0x051; pub const XK_R: c_uint = 0x052; pub const XK_S: c_uint = 0x053; pub const XK_T: c_uint = 0x054; pub const XK_U: c_uint = 0x055; pub const XK_V: c_uint = 0x056; pub const XK_W: c_uint = 0x057; pub const XK_X: c_uint = 0x058; pub const XK_Y: c_uint = 0x059; pub const XK_Z: c_uint = 0x05a; pub const XK_bracketleft: c_uint = 0x05b; pub const XK_backslash: c_uint = 0x05c; pub const XK_bracketright: c_uint = 0x05d; pub const XK_asciicircum: c_uint = 0x05e; pub const XK_underscore: c_uint = 0x05f; pub const XK_grave: c_uint = 0x060; pub const XK_quoteleft: c_uint = 0x060; pub const XK_a: c_uint = 0x061; pub const XK_b: c_uint = 0x062; pub const XK_c: c_uint = 0x063; pub const XK_d: c_uint = 0x064; pub const XK_e: c_uint = 0x065; pub const XK_f: c_uint = 0x066; pub const XK_g: c_uint = 0x067; pub const XK_h: c_uint = 0x068; pub const XK_i: c_uint = 0x069; pub const XK_j: c_uint = 0x06a; pub const XK_k: c_uint = 0x06b; pub const XK_l: c_uint = 0x06c; pub const XK_m: c_uint = 0x06d; pub const XK_n: c_uint = 0x06e; pub const XK_o: c_uint = 0x06f; pub const XK_p: c_uint = 0x070; pub const XK_q: c_uint = 0x071; pub const XK_r: c_uint = 0x072; pub const XK_s: c_uint = 0x073; pub const XK_t: c_uint = 0x074; pub const XK_u: c_uint = 0x075; pub const XK_v: c_uint = 0x076; pub const XK_w: c_uint = 0x077; pub const XK_x: c_uint = 0x078; pub const XK_y: c_uint = 0x079; pub const XK_z: c_uint = 0x07a; pub const XK_braceleft: c_uint = 0x07b; pub const XK_bar: c_uint = 0x07c; pub const XK_braceright: c_uint = 0x07d; pub const XK_asciitilde: c_uint = 0x07e; pub const XK_nobreakspace: c_uint = 0x0a0; pub const XK_exclamdown: c_uint = 0x0a1; pub const XK_cent: c_uint = 0x0a2; pub const XK_sterling: c_uint = 0x0a3; pub const XK_currency: c_uint = 0x0a4; pub const XK_yen: c_uint = 0x0a5; pub const XK_brokenbar: c_uint = 0x0a6; pub const XK_section: c_uint = 0x0a7; pub const XK_diaeresis: c_uint = 0x0a8; pub const XK_copyright: c_uint = 0x0a9; pub const XK_ordfeminine: c_uint = 0x0aa; pub const XK_guillemotleft: c_uint = 0x0ab; pub const XK_notsign: c_uint = 0x0ac; pub const XK_hyphen: c_uint = 0x0ad; pub const XK_registered: c_uint = 0x0ae; pub const XK_macron: c_uint = 0x0af; pub const XK_degree: c_uint = 0x0b0; pub const XK_plusminus: c_uint = 0x0b1; pub const XK_twosuperior: c_uint = 0x0b2; pub const XK_threesuperior: c_uint = 0x0b3; pub const XK_acute: c_uint = 0x0b4; pub const XK_mu: c_uint = 0x0b5; pub const XK_paragraph: c_uint = 0x0b6; pub const XK_periodcentered: c_uint = 0x0b7; pub const XK_cedilla: c_uint = 0x0b8; pub const XK_onesuperior: c_uint = 0x0b9; pub const XK_masculine: c_uint = 0x0ba; pub const XK_guillemotright: c_uint = 0x0bb; pub const XK_onequarter: c_uint = 0x0bc; pub const XK_onehalf: c_uint = 0x0bd; pub const XK_threequarters: c_uint = 0x0be; pub const XK_questiondown: c_uint = 0x0bf; pub const XK_Agrave: c_uint = 0x0c0; pub const XK_Aacute: c_uint = 0x0c1; pub const XK_Acircumflex: c_uint = 0x0c2; pub const XK_Atilde: c_uint = 0x0c3; pub const XK_Adiaeresis: c_uint = 0x0c4; pub const XK_Aring: c_uint = 0x0c5; pub const XK_AE: c_uint = 0x0c6; pub const XK_Ccedilla: c_uint = 0x0c7; pub const XK_Egrave: c_uint = 0x0c8; pub const XK_Eacute: c_uint = 0x0c9; pub const XK_Ecircumflex: c_uint = 0x0ca; pub const XK_Ediaeresis: c_uint = 0x0cb; pub const XK_Igrave: c_uint = 0x0cc; pub const XK_Iacute: c_uint = 0x0cd; pub const XK_Icircumflex: c_uint = 0x0ce; pub const XK_Idiaeresis: c_uint = 0x0cf; pub const XK_ETH: c_uint = 0x0d0; pub const XK_Eth: c_uint = 0x0d0; pub const XK_Ntilde: c_uint = 0x0d1; pub const XK_Ograve: c_uint = 0x0d2; pub const XK_Oacute: c_uint = 0x0d3; pub const XK_Ocircumflex: c_uint = 0x0d4; pub const XK_Otilde: c_uint = 0x0d5; pub const XK_Odiaeresis: c_uint = 0x0d6; pub const XK_multiply: c_uint = 0x0d7; pub const XK_Ooblique: c_uint = 0x0d8; pub const XK_Ugrave: c_uint = 0x0d9; pub const XK_Uacute: c_uint = 0x0da; pub const XK_Ucircumflex: c_uint = 0x0db; pub const XK_Udiaeresis: c_uint = 0x0dc; pub const XK_Yacute: c_uint = 0x0dd; pub const XK_THORN: c_uint = 0x0de; pub const XK_Thorn: c_uint = 0x0de; pub const XK_ssharp: c_uint = 0x0df; pub const XK_agrave: c_uint = 0x0e0; pub const XK_aacute: c_uint = 0x0e1; pub const XK_acircumflex: c_uint = 0x0e2; pub const XK_atilde: c_uint = 0x0e3; pub const XK_adiaeresis: c_uint = 0x0e4; pub const XK_aring: c_uint = 0x0e5; pub const XK_ae: c_uint = 0x0e6; pub const XK_ccedilla: c_uint = 0x0e7; pub const XK_egrave: c_uint = 0x0e8; pub const XK_eacute: c_uint = 0x0e9; pub const XK_ecircumflex: c_uint = 0x0ea; pub const XK_ediaeresis: c_uint = 0x0eb; pub const XK_igrave: c_uint = 0x0ec; pub const XK_iacute: c_uint = 0x0ed; pub const XK_icircumflex: c_uint = 0x0ee; pub const XK_idiaeresis: c_uint = 0x0ef; pub const XK_eth: c_uint = 0x0f0; pub const XK_ntilde: c_uint = 0x0f1; pub const XK_ograve: c_uint = 0x0f2; pub const XK_oacute: c_uint = 0x0f3; pub const XK_ocircumflex: c_uint = 0x0f4; pub const XK_otilde: c_uint = 0x0f5; pub const XK_odiaeresis: c_uint = 0x0f6; pub const XK_division: c_uint = 0x0f7; pub const XK_oslash: c_uint = 0x0f8; pub const XK_ugrave: c_uint = 0x0f9; pub const XK_uacute: c_uint = 0x0fa; pub const XK_ucircumflex: c_uint = 0x0fb; pub const XK_udiaeresis: c_uint = 0x0fc; pub const XK_yacute: c_uint = 0x0fd; pub const XK_thorn: c_uint = 0x0fe; pub const XK_ydiaeresis: c_uint = 0x0ff; pub const XK_Aogonek: c_uint = 0x1a1; pub const XK_breve: c_uint = 0x1a2; pub const XK_Lstroke: c_uint = 0x1a3; pub const XK_Lcaron: c_uint = 0x1a5; pub const XK_Sacute: c_uint = 0x1a6; pub const XK_Scaron: c_uint = 0x1a9; pub const XK_Scedilla: c_uint = 0x1aa; pub const XK_Tcaron: c_uint = 0x1ab; pub const XK_Zacute: c_uint = 0x1ac; pub const XK_Zcaron: c_uint = 0x1ae; pub const XK_Zabovedot: c_uint = 0x1af; pub const XK_aogonek: c_uint = 0x1b1; pub const XK_ogonek: c_uint = 0x1b2; pub const XK_lstroke: c_uint = 0x1b3; pub const XK_lcaron: c_uint = 0x1b5; pub const XK_sacute: c_uint = 0x1b6; pub const XK_caron: c_uint = 0x1b7; pub const XK_scaron: c_uint = 0x1b9; pub const XK_scedilla: c_uint = 0x1ba; pub const XK_tcaron: c_uint = 0x1bb; pub const XK_zacute: c_uint = 0x1bc; pub const XK_doubleacute: c_uint = 0x1bd; pub const XK_zcaron: c_uint = 0x1be; pub const XK_zabovedot: c_uint = 0x1bf; pub const XK_Racute: c_uint = 0x1c0; pub const XK_Abreve: c_uint = 0x1c3; pub const XK_Lacute: c_uint = 0x1c5; pub const XK_Cacute: c_uint = 0x1c6; pub const XK_Ccaron: c_uint = 0x1c8; pub const XK_Eogonek: c_uint = 0x1ca; pub const XK_Ecaron: c_uint = 0x1cc; pub const XK_Dcaron: c_uint = 0x1cf; pub const XK_Dstroke: c_uint = 0x1d0; pub const XK_Nacute: c_uint = 0x1d1; pub const XK_Ncaron: c_uint = 0x1d2; pub const XK_Odoubleacute: c_uint = 0x1d5; pub const XK_Rcaron: c_uint = 0x1d8; pub const XK_Uring: c_uint = 0x1d9; pub const XK_Udoubleacute: c_uint = 0x1db; pub const XK_Tcedilla: c_uint = 0x1de; pub const XK_racute: c_uint = 0x1e0; pub const XK_abreve: c_uint = 0x1e3; pub const XK_lacute: c_uint = 0x1e5; pub const XK_cacute: c_uint = 0x1e6; pub const XK_ccaron: c_uint = 0x1e8; pub const XK_eogonek: c_uint = 0x1ea; pub const XK_ecaron: c_uint = 0x1ec; pub const XK_dcaron: c_uint = 0x1ef; pub const XK_dstroke: c_uint = 0x1f0; pub const XK_nacute: c_uint = 0x1f1; pub const XK_ncaron: c_uint = 0x1f2; pub const XK_odoubleacute: c_uint = 0x1f5; pub const XK_udoubleacute: c_uint = 0x1fb; pub const XK_rcaron: c_uint = 0x1f8; pub const XK_uring: c_uint = 0x1f9; pub const XK_tcedilla: c_uint = 0x1fe; pub const XK_abovedot: c_uint = 0x1ff; pub const XK_Hstroke: c_uint = 0x2a1; pub const XK_Hcircumflex: c_uint = 0x2a6; pub const XK_Iabovedot: c_uint = 0x2a9; pub const XK_Gbreve: c_uint = 0x2ab; pub const XK_Jcircumflex: c_uint = 0x2ac; pub const XK_hstroke: c_uint = 0x2b1; pub const XK_hcircumflex: c_uint = 0x2b6; pub const XK_idotless: c_uint = 0x2b9; pub const XK_gbreve: c_uint = 0x2bb; pub const XK_jcircumflex: c_uint = 0x2bc; pub const XK_Cabovedot: c_uint = 0x2c5; pub const XK_Ccircumflex: c_uint = 0x2c6; pub const XK_Gabovedot: c_uint = 0x2d5; pub const XK_Gcircumflex: c_uint = 0x2d8; pub const XK_Ubreve: c_uint = 0x2dd; pub const XK_Scircumflex: c_uint = 0x2de; pub const XK_cabovedot: c_uint = 0x2e5; pub const XK_ccircumflex: c_uint = 0x2e6; pub const XK_gabovedot: c_uint = 0x2f5; pub const XK_gcircumflex: c_uint = 0x2f8; pub const XK_ubreve: c_uint = 0x2fd; pub const XK_scircumflex: c_uint = 0x2fe; pub const XK_kra: c_uint = 0x3a2; pub const XK_kappa: c_uint = 0x3a2; pub const XK_Rcedilla: c_uint = 0x3a3; pub const XK_Itilde: c_uint = 0x3a5; pub const XK_Lcedilla: c_uint = 0x3a6; pub const XK_Emacron: c_uint = 0x3aa; pub const XK_Gcedilla: c_uint = 0x3ab; pub const XK_Tslash: c_uint = 0x3ac; pub const XK_rcedilla: c_uint = 0x3b3; pub const XK_itilde: c_uint = 0x3b5; pub const XK_lcedilla: c_uint = 0x3b6; pub const XK_emacron: c_uint = 0x3ba; pub const XK_gcedilla: c_uint = 0x3bb; pub const XK_tslash: c_uint = 0x3bc; pub const XK_ENG: c_uint = 0x3bd; pub const XK_eng: c_uint = 0x3bf; pub const XK_Amacron: c_uint = 0x3c0; pub const XK_Iogonek: c_uint = 0x3c7; pub const XK_Eabovedot: c_uint = 0x3cc; pub const XK_Imacron: c_uint = 0x3cf; pub const XK_Ncedilla: c_uint = 0x3d1; pub const XK_Omacron: c_uint = 0x3d2; pub const XK_Kcedilla: c_uint = 0x3d3; pub const XK_Uogonek: c_uint = 0x3d9; pub const XK_Utilde: c_uint = 0x3dd; pub const XK_Umacron: c_uint = 0x3de; pub const XK_amacron: c_uint = 0x3e0; pub const XK_iogonek: c_uint = 0x3e7; pub const XK_eabovedot: c_uint = 0x3ec; pub const XK_imacron: c_uint = 0x3ef; pub const XK_ncedilla: c_uint = 0x3f1; pub const XK_omacron: c_uint = 0x3f2; pub const XK_kcedilla: c_uint = 0x3f3; pub const XK_uogonek: c_uint = 0x3f9; pub const XK_utilde: c_uint = 0x3fd; pub const XK_umacron: c_uint = 0x3fe; pub const XK_overline: c_uint = 0x47e; pub const XK_kana_fullstop: c_uint = 0x4a1; pub const XK_kana_openingbracket: c_uint = 0x4a2; pub const XK_kana_closingbracket: c_uint = 0x4a3; pub const XK_kana_comma: c_uint = 0x4a4; pub const XK_kana_conjunctive: c_uint = 0x4a5; pub const XK_kana_middledot: c_uint = 0x4a5; pub const XK_kana_WO: c_uint = 0x4a6; pub const XK_kana_a: c_uint = 0x4a7; pub const XK_kana_i: c_uint = 0x4a8; pub const XK_kana_u: c_uint = 0x4a9; pub const XK_kana_e: c_uint = 0x4aa; pub const XK_kana_o: c_uint = 0x4ab; pub const XK_kana_ya: c_uint = 0x4ac; pub const XK_kana_yu: c_uint = 0x4ad; pub const XK_kana_yo: c_uint = 0x4ae; pub const XK_kana_tsu: c_uint = 0x4af; pub const XK_kana_tu: c_uint = 0x4af; pub const XK_prolongedsound: c_uint = 0x4b0; pub const XK_kana_A: c_uint = 0x4b1; pub const XK_kana_I: c_uint = 0x4b2; pub const XK_kana_U: c_uint = 0x4b3; pub const XK_kana_E: c_uint = 0x4b4; pub const XK_kana_O: c_uint = 0x4b5; pub const XK_kana_KA: c_uint = 0x4b6; pub const XK_kana_KI: c_uint = 0x4b7; pub const XK_kana_KU: c_uint = 0x4b8; pub const XK_kana_KE: c_uint = 0x4b9; pub const XK_kana_KO: c_uint = 0x4ba; pub const XK_kana_SA: c_uint = 0x4bb; pub const XK_kana_SHI: c_uint = 0x4bc; pub const XK_kana_SU: c_uint = 0x4bd; pub const XK_kana_SE: c_uint = 0x4be; pub const XK_kana_SO: c_uint = 0x4bf; pub const XK_kana_TA: c_uint = 0x4c0; pub const XK_kana_CHI: c_uint = 0x4c1; pub const XK_kana_TI: c_uint = 0x4c1; pub const XK_kana_TSU: c_uint = 0x4c2; pub const XK_kana_TU: c_uint = 0x4c2; pub const XK_kana_TE: c_uint = 0x4c3; pub const XK_kana_TO: c_uint = 0x4c4; pub const XK_kana_NA: c_uint = 0x4c5; pub const XK_kana_NI: c_uint = 0x4c6; pub const XK_kana_NU: c_uint = 0x4c7; pub const XK_kana_NE: c_uint = 0x4c8; pub const XK_kana_NO: c_uint = 0x4c9; pub const XK_kana_HA: c_uint = 0x4ca; pub const XK_kana_HI: c_uint = 0x4cb; pub const XK_kana_FU: c_uint = 0x4cc; pub const XK_kana_HU: c_uint = 0x4cc; pub const XK_kana_HE: c_uint = 0x4cd; pub const XK_kana_HO: c_uint = 0x4ce; pub const XK_kana_MA: c_uint = 0x4cf; pub const XK_kana_MI: c_uint = 0x4d0; pub const XK_kana_MU: c_uint = 0x4d1; pub const XK_kana_ME: c_uint = 0x4d2; pub const XK_kana_MO: c_uint = 0x4d3; pub const XK_kana_YA: c_uint = 0x4d4; pub const XK_kana_YU: c_uint = 0x4d5; pub const XK_kana_YO: c_uint = 0x4d6; pub const XK_kana_RA: c_uint = 0x4d7; pub const XK_kana_RI: c_uint = 0x4d8; pub const XK_kana_RU: c_uint = 0x4d9; pub const XK_kana_RE: c_uint = 0x4da; pub const XK_kana_RO: c_uint = 0x4db; pub const XK_kana_WA: c_uint = 0x4dc; pub const XK_kana_N: c_uint = 0x4dd; pub const XK_voicedsound: c_uint = 0x4de; pub const XK_semivoicedsound: c_uint = 0x4df; pub const XK_kana_switch: c_uint = 0xFF7E; pub const XK_Arabic_comma: c_uint = 0x5ac; pub const XK_Arabic_semicolon: c_uint = 0x5bb; pub const XK_Arabic_question_mark: c_uint = 0x5bf; pub const XK_Arabic_hamza: c_uint = 0x5c1; pub const XK_Arabic_maddaonalef: c_uint = 0x5c2; pub const XK_Arabic_hamzaonalef: c_uint = 0x5c3; pub const XK_Arabic_hamzaonwaw: c_uint = 0x5c4; pub const XK_Arabic_hamzaunderalef: c_uint = 0x5c5; pub const XK_Arabic_hamzaonyeh: c_uint = 0x5c6; pub const XK_Arabic_alef: c_uint = 0x5c7; pub const XK_Arabic_beh: c_uint = 0x5c8; pub const XK_Arabic_tehmarbuta: c_uint = 0x5c9; pub const XK_Arabic_teh: c_uint = 0x5ca; pub const XK_Arabic_theh: c_uint = 0x5cb; pub const XK_Arabic_jeem: c_uint = 0x5cc; pub const XK_Arabic_hah: c_uint = 0x5cd; pub const XK_Arabic_khah: c_uint = 0x5ce; pub const XK_Arabic_dal: c_uint = 0x5cf; pub const XK_Arabic_thal: c_uint = 0x5d0; pub const XK_Arabic_ra: c_uint = 0x5d1; pub const XK_Arabic_zain: c_uint = 0x5d2; pub const XK_Arabic_seen: c_uint = 0x5d3; pub const XK_Arabic_sheen: c_uint = 0x5d4; pub const XK_Arabic_sad: c_uint = 0x5d5; pub const XK_Arabic_dad: c_uint = 0x5d6; pub const XK_Arabic_tah: c_uint = 0x5d7; pub const XK_Arabic_zah: c_uint = 0x5d8; pub const XK_Arabic_ain: c_uint = 0x5d9; pub const XK_Arabic_ghain: c_uint = 0x5da; pub const XK_Arabic_tatweel: c_uint = 0x5e0; pub const XK_Arabic_feh: c_uint = 0x5e1; pub const XK_Arabic_qaf: c_uint = 0x5e2; pub const XK_Arabic_kaf: c_uint = 0x5e3; pub const XK_Arabic_lam: c_uint = 0x5e4; pub const XK_Arabic_meem: c_uint = 0x5e5; pub const XK_Arabic_noon: c_uint = 0x5e6; pub const XK_Arabic_ha: c_uint = 0x5e7; pub const XK_Arabic_heh: c_uint = 0x5e7; pub const XK_Arabic_waw: c_uint = 0x5e8; pub const XK_Arabic_alefmaksura: c_uint = 0x5e9; pub const XK_Arabic_yeh: c_uint = 0x5ea; pub const XK_Arabic_fathatan: c_uint = 0x5eb; pub const XK_Arabic_dammatan: c_uint = 0x5ec; pub const XK_Arabic_kasratan: c_uint = 0x5ed; pub const XK_Arabic_fatha: c_uint = 0x5ee; pub const XK_Arabic_damma: c_uint = 0x5ef; pub const XK_Arabic_kasra: c_uint = 0x5f0; pub const XK_Arabic_shadda: c_uint = 0x5f1; pub const XK_Arabic_sukun: c_uint = 0x5f2; pub const XK_Arabic_switch: c_uint = 0xFF7E; pub const XK_Serbian_dje: c_uint = 0x6a1; pub const XK_Macedonia_gje: c_uint = 0x6a2; pub const XK_Cyrillic_io: c_uint = 0x6a3; pub const XK_Ukrainian_ie: c_uint = 0x6a4; pub const XK_Ukranian_je: c_uint = 0x6a4; pub const XK_Macedonia_dse: c_uint = 0x6a5; pub const XK_Ukrainian_i: c_uint = 0x6a6; pub const XK_Ukranian_i: c_uint = 0x6a6; pub const XK_Ukrainian_yi: c_uint = 0x6a7; pub const XK_Ukranian_yi: c_uint = 0x6a7; pub const XK_Cyrillic_je: c_uint = 0x6a8; pub const XK_Serbian_je: c_uint = 0x6a8; pub const XK_Cyrillic_lje: c_uint = 0x6a9; pub const XK_Serbian_lje: c_uint = 0x6a9; pub const XK_Cyrillic_nje: c_uint = 0x6aa; pub const XK_Serbian_nje: c_uint = 0x6aa; pub const XK_Serbian_tshe: c_uint = 0x6ab; pub const XK_Macedonia_kje: c_uint = 0x6ac; pub const XK_Byelorussian_shortu: c_uint = 0x6ae; pub const XK_Cyrillic_dzhe: c_uint = 0x6af; pub const XK_Serbian_dze: c_uint = 0x6af; pub const XK_numerosign: c_uint = 0x6b0; pub const XK_Serbian_DJE: c_uint = 0x6b1; pub const XK_Macedonia_GJE: c_uint = 0x6b2; pub const XK_Cyrillic_IO: c_uint = 0x6b3; pub const XK_Ukrainian_IE: c_uint = 0x6b4; pub const XK_Ukranian_JE: c_uint = 0x6b4; pub const XK_Macedonia_DSE: c_uint = 0x6b5; pub const XK_Ukrainian_I: c_uint = 0x6b6; pub const XK_Ukranian_I: c_uint = 0x6b6; pub const XK_Ukrainian_YI: c_uint = 0x6b7; pub const XK_Ukranian_YI: c_uint = 0x6b7; pub const XK_Cyrillic_JE: c_uint = 0x6b8; pub const XK_Serbian_JE: c_uint = 0x6b8; pub const XK_Cyrillic_LJE: c_uint = 0x6b9; pub const XK_Serbian_LJE: c_uint = 0x6b9; pub const XK_Cyrillic_NJE: c_uint = 0x6ba; pub const XK_Serbian_NJE: c_uint = 0x6ba; pub const XK_Serbian_TSHE: c_uint = 0x6bb; pub const XK_Macedonia_KJE: c_uint = 0x6bc; pub const XK_Byelorussian_SHORTU: c_uint = 0x6be; pub const XK_Cyrillic_DZHE: c_uint = 0x6bf; pub const XK_Serbian_DZE: c_uint = 0x6bf; pub const XK_Cyrillic_yu: c_uint = 0x6c0; pub const XK_Cyrillic_a: c_uint = 0x6c1; pub const XK_Cyrillic_be: c_uint = 0x6c2; pub const XK_Cyrillic_tse: c_uint = 0x6c3; pub const XK_Cyrillic_de: c_uint = 0x6c4; pub const XK_Cyrillic_ie: c_uint = 0x6c5; pub const XK_Cyrillic_ef: c_uint = 0x6c6; pub const XK_Cyrillic_ghe: c_uint = 0x6c7; pub const XK_Cyrillic_ha: c_uint = 0x6c8; pub const XK_Cyrillic_i: c_uint = 0x6c9; pub const XK_Cyrillic_shorti: c_uint = 0x6ca; pub const XK_Cyrillic_ka: c_uint = 0x6cb; pub const XK_Cyrillic_el: c_uint = 0x6cc; pub const XK_Cyrillic_em: c_uint = 0x6cd; pub const XK_Cyrillic_en: c_uint = 0x6ce; pub const XK_Cyrillic_o: c_uint = 0x6cf; pub const XK_Cyrillic_pe: c_uint = 0x6d0; pub const XK_Cyrillic_ya: c_uint = 0x6d1; pub const XK_Cyrillic_er: c_uint = 0x6d2; pub const XK_Cyrillic_es: c_uint = 0x6d3; pub const XK_Cyrillic_te: c_uint = 0x6d4; pub const XK_Cyrillic_u: c_uint = 0x6d5; pub const XK_Cyrillic_zhe: c_uint = 0x6d6; pub const XK_Cyrillic_ve: c_uint = 0x6d7; pub const XK_Cyrillic_softsign: c_uint = 0x6d8; pub const XK_Cyrillic_yeru: c_uint = 0x6d9; pub const XK_Cyrillic_ze: c_uint = 0x6da; pub const XK_Cyrillic_sha: c_uint = 0x6db; pub const XK_Cyrillic_e: c_uint = 0x6dc; pub const XK_Cyrillic_shcha: c_uint = 0x6dd; pub const XK_Cyrillic_che: c_uint = 0x6de; pub const XK_Cyrillic_hardsign: c_uint = 0x6df; pub const XK_Cyrillic_YU: c_uint = 0x6e0; pub const XK_Cyrillic_A: c_uint = 0x6e1; pub const XK_Cyrillic_BE: c_uint = 0x6e2; pub const XK_Cyrillic_TSE: c_uint = 0x6e3; pub const XK_Cyrillic_DE: c_uint = 0x6e4; pub const XK_Cyrillic_IE: c_uint = 0x6e5; pub const XK_Cyrillic_EF: c_uint = 0x6e6; pub const XK_Cyrillic_GHE: c_uint = 0x6e7; pub const XK_Cyrillic_HA: c_uint = 0x6e8; pub const XK_Cyrillic_I: c_uint = 0x6e9; pub const XK_Cyrillic_SHORTI: c_uint = 0x6ea; pub const XK_Cyrillic_KA: c_uint = 0x6eb; pub const XK_Cyrillic_EL: c_uint = 0x6ec; pub const XK_Cyrillic_EM: c_uint = 0x6ed; pub const XK_Cyrillic_EN: c_uint = 0x6ee; pub const XK_Cyrillic_O: c_uint = 0x6ef; pub const XK_Cyrillic_PE: c_uint = 0x6f0; pub const XK_Cyrillic_YA: c_uint = 0x6f1; pub const XK_Cyrillic_ER: c_uint = 0x6f2; pub const XK_Cyrillic_ES: c_uint = 0x6f3; pub const XK_Cyrillic_TE: c_uint = 0x6f4; pub const XK_Cyrillic_U: c_uint = 0x6f5; pub const XK_Cyrillic_ZHE: c_uint = 0x6f6; pub const XK_Cyrillic_VE: c_uint = 0x6f7; pub const XK_Cyrillic_SOFTSIGN: c_uint = 0x6f8; pub const XK_Cyrillic_YERU: c_uint = 0x6f9; pub const XK_Cyrillic_ZE: c_uint = 0x6fa; pub const XK_Cyrillic_SHA: c_uint = 0x6fb; pub const XK_Cyrillic_E: c_uint = 0x6fc; pub const XK_Cyrillic_SHCHA: c_uint = 0x6fd; pub const XK_Cyrillic_CHE: c_uint = 0x6fe; pub const XK_Cyrillic_HARDSIGN: c_uint = 0x6ff; pub const XK_Greek_ALPHAaccent: c_uint = 0x7a1; pub const XK_Greek_EPSILONaccent: c_uint = 0x7a2; pub const XK_Greek_ETAaccent: c_uint = 0x7a3; pub const XK_Greek_IOTAaccent: c_uint = 0x7a4; pub const XK_Greek_IOTAdiaeresis: c_uint = 0x7a5; pub const XK_Greek_OMICRONaccent: c_uint = 0x7a7; pub const XK_Greek_UPSILONaccent: c_uint = 0x7a8; pub const XK_Greek_UPSILONdieresis: c_uint = 0x7a9; pub const XK_Greek_OMEGAaccent: c_uint = 0x7ab; pub const XK_Greek_accentdieresis: c_uint = 0x7ae; pub const XK_Greek_horizbar: c_uint = 0x7af; pub const XK_Greek_alphaaccent: c_uint = 0x7b1; pub const XK_Greek_epsilonaccent: c_uint = 0x7b2; pub const XK_Greek_etaaccent: c_uint = 0x7b3; pub const XK_Greek_iotaaccent: c_uint = 0x7b4; pub const XK_Greek_iotadieresis: c_uint = 0x7b5; pub const XK_Greek_iotaaccentdieresis: c_uint = 0x7b6; pub const XK_Greek_omicronaccent: c_uint = 0x7b7; pub const XK_Greek_upsilonaccent: c_uint = 0x7b8; pub const XK_Greek_upsilondieresis: c_uint = 0x7b9; pub const XK_Greek_upsilonaccentdieresis: c_uint = 0x7ba; pub const XK_Greek_omegaaccent: c_uint = 0x7bb; pub const XK_Greek_ALPHA: c_uint = 0x7c1; pub const XK_Greek_BETA: c_uint = 0x7c2; pub const XK_Greek_GAMMA: c_uint = 0x7c3; pub const XK_Greek_DELTA: c_uint = 0x7c4; pub const XK_Greek_EPSILON: c_uint = 0x7c5; pub const XK_Greek_ZETA: c_uint = 0x7c6; pub const XK_Greek_ETA: c_uint = 0x7c7; pub const XK_Greek_THETA: c_uint = 0x7c8; pub const XK_Greek_IOTA: c_uint = 0x7c9; pub const XK_Greek_KAPPA: c_uint = 0x7ca; pub const XK_Greek_LAMDA: c_uint = 0x7cb; pub const XK_Greek_LAMBDA: c_uint = 0x7cb; pub const XK_Greek_MU: c_uint = 0x7cc; pub const XK_Greek_NU: c_uint = 0x7cd; pub const XK_Greek_XI: c_uint = 0x7ce; pub const XK_Greek_OMICRON: c_uint = 0x7cf; pub const XK_Greek_PI: c_uint = 0x7d0; pub const XK_Greek_RHO: c_uint = 0x7d1; pub const XK_Greek_SIGMA: c_uint = 0x7d2; pub const XK_Greek_TAU: c_uint = 0x7d4; pub const XK_Greek_UPSILON: c_uint = 0x7d5; pub const XK_Greek_PHI: c_uint = 0x7d6; pub const XK_Greek_CHI: c_uint = 0x7d7; pub const XK_Greek_PSI: c_uint = 0x7d8; pub const XK_Greek_OMEGA: c_uint = 0x7d9; pub const XK_Greek_alpha: c_uint = 0x7e1; pub const XK_Greek_beta: c_uint = 0x7e2; pub const XK_Greek_gamma: c_uint = 0x7e3; pub const XK_Greek_delta: c_uint = 0x7e4; pub const XK_Greek_epsilon: c_uint = 0x7e5; pub const XK_Greek_zeta: c_uint = 0x7e6; pub const XK_Greek_eta: c_uint = 0x7e7; pub const XK_Greek_theta: c_uint = 0x7e8; pub const XK_Greek_iota: c_uint = 0x7e9; pub const XK_Greek_kappa: c_uint = 0x7ea; pub const XK_Greek_lamda: c_uint = 0x7eb; pub const XK_Greek_lambda: c_uint = 0x7eb; pub const XK_Greek_mu: c_uint = 0x7ec; pub const XK_Greek_nu: c_uint = 0x7ed; pub const XK_Greek_xi: c_uint = 0x7ee; pub const XK_Greek_omicron: c_uint = 0x7ef; pub const XK_Greek_pi: c_uint = 0x7f0; pub const XK_Greek_rho: c_uint = 0x7f1; pub const XK_Greek_sigma: c_uint = 0x7f2; pub const XK_Greek_finalsmallsigma: c_uint = 0x7f3; pub const XK_Greek_tau: c_uint = 0x7f4; pub const XK_Greek_upsilon: c_uint = 0x7f5; pub const XK_Greek_phi: c_uint = 0x7f6; pub const XK_Greek_chi: c_uint = 0x7f7; pub const XK_Greek_psi: c_uint = 0x7f8; pub const XK_Greek_omega: c_uint = 0x7f9; pub const XK_Greek_switch: c_uint = 0xFF7E; pub const XK_leftradical: c_uint = 0x8a1; pub const XK_topleftradical: c_uint = 0x8a2; pub const XK_horizconnector: c_uint = 0x8a3; pub const XK_topintegral: c_uint = 0x8a4; pub const XK_botintegral: c_uint = 0x8a5; pub const XK_vertconnector: c_uint = 0x8a6; pub const XK_topleftsqbracket: c_uint = 0x8a7; pub const XK_botleftsqbracket: c_uint = 0x8a8; pub const XK_toprightsqbracket: c_uint = 0x8a9; pub const XK_botrightsqbracket: c_uint = 0x8aa; pub const XK_topleftparens: c_uint = 0x8ab; pub const XK_botleftparens: c_uint = 0x8ac; pub const XK_toprightparens: c_uint = 0x8ad; pub const XK_botrightparens: c_uint = 0x8ae; pub const XK_leftmiddlecurlybrace: c_uint = 0x8af; pub const XK_rightmiddlecurlybrace: c_uint = 0x8b0; pub const XK_topleftsummation: c_uint = 0x8b1; pub const XK_botleftsummation: c_uint = 0x8b2; pub const XK_topvertsummationconnector: c_uint = 0x8b3; pub const XK_botvertsummationconnector: c_uint = 0x8b4; pub const XK_toprightsummation: c_uint = 0x8b5; pub const XK_botrightsummation: c_uint = 0x8b6; pub const XK_rightmiddlesummation: c_uint = 0x8b7; pub const XK_lessthanequal: c_uint = 0x8bc; pub const XK_notequal: c_uint = 0x8bd; pub const XK_greaterthanequal: c_uint = 0x8be; pub const XK_integral: c_uint = 0x8bf; pub const XK_therefore: c_uint = 0x8c0; pub const XK_variation: c_uint = 0x8c1; pub const XK_infinity: c_uint = 0x8c2; pub const XK_nabla: c_uint = 0x8c5; pub const XK_approximate: c_uint = 0x8c8; pub const XK_similarequal: c_uint = 0x8c9; pub const XK_ifonlyif: c_uint = 0x8cd; pub const XK_implies: c_uint = 0x8ce; pub const XK_identical: c_uint = 0x8cf; pub const XK_radical: c_uint = 0x8d6; pub const XK_includedin: c_uint = 0x8da; pub const XK_includes: c_uint = 0x8db; pub const XK_intersection: c_uint = 0x8dc; pub const XK_union: c_uint = 0x8dd; pub const XK_logicaland: c_uint = 0x8de; pub const XK_logicalor: c_uint = 0x8df; pub const XK_partialderivative: c_uint = 0x8ef; pub const XK_function: c_uint = 0x8f6; pub const XK_leftarrow: c_uint = 0x8fb; pub const XK_uparrow: c_uint = 0x8fc; pub const XK_rightarrow: c_uint = 0x8fd; pub const XK_downarrow: c_uint = 0x8fe; pub const XK_blank: c_uint = 0x9df; pub const XK_soliddiamond: c_uint = 0x9e0; pub const XK_checkerboard: c_uint = 0x9e1; pub const XK_ht: c_uint = 0x9e2; pub const XK_ff: c_uint = 0x9e3; pub const XK_cr: c_uint = 0x9e4; pub const XK_lf: c_uint = 0x9e5; pub const XK_nl: c_uint = 0x9e8; pub const XK_vt: c_uint = 0x9e9; pub const XK_lowrightcorner: c_uint = 0x9ea; pub const XK_uprightcorner: c_uint = 0x9eb; pub const XK_upleftcorner: c_uint = 0x9ec; pub const XK_lowleftcorner: c_uint = 0x9ed; pub const XK_crossinglines: c_uint = 0x9ee; pub const XK_horizlinescan1: c_uint = 0x9ef; pub const XK_horizlinescan3: c_uint = 0x9f0; pub const XK_horizlinescan5: c_uint = 0x9f1; pub const XK_horizlinescan7: c_uint = 0x9f2; pub const XK_horizlinescan9: c_uint = 0x9f3; pub const XK_leftt: c_uint = 0x9f4; pub const XK_rightt: c_uint = 0x9f5; pub const XK_bott: c_uint = 0x9f6; pub const XK_topt: c_uint = 0x9f7; pub const XK_vertbar: c_uint = 0x9f8; pub const XK_emspace: c_uint = 0xaa1; pub const XK_enspace: c_uint = 0xaa2; pub const XK_em3space: c_uint = 0xaa3; pub const XK_em4space: c_uint = 0xaa4; pub const XK_digitspace: c_uint = 0xaa5; pub const XK_punctspace: c_uint = 0xaa6; pub const XK_thinspace: c_uint = 0xaa7; pub const XK_hairspace: c_uint = 0xaa8; pub const XK_emdash: c_uint = 0xaa9; pub const XK_endash: c_uint = 0xaaa; pub const XK_signifblank: c_uint = 0xaac; pub const XK_ellipsis: c_uint = 0xaae; pub const XK_doubbaselinedot: c_uint = 0xaaf; pub const XK_onethird: c_uint = 0xab0; pub const XK_twothirds: c_uint = 0xab1; pub const XK_onefifth: c_uint = 0xab2; pub const XK_twofifths: c_uint = 0xab3; pub const XK_threefifths: c_uint = 0xab4; pub const XK_fourfifths: c_uint = 0xab5; pub const XK_onesixth: c_uint = 0xab6; pub const XK_fivesixths: c_uint = 0xab7; pub const XK_careof: c_uint = 0xab8; pub const XK_figdash: c_uint = 0xabb; pub const XK_leftanglebracket: c_uint = 0xabc; pub const XK_decimalpoint: c_uint = 0xabd; pub const XK_rightanglebracket: c_uint = 0xabe; pub const XK_marker: c_uint = 0xabf; pub const XK_oneeighth: c_uint = 0xac3; pub const XK_threeeighths: c_uint = 0xac4; pub const XK_fiveeighths: c_uint = 0xac5; pub const XK_seveneighths: c_uint = 0xac6; pub const XK_trademark: c_uint = 0xac9; pub const XK_signaturemark: c_uint = 0xaca; pub const XK_trademarkincircle: c_uint = 0xacb; pub const XK_leftopentriangle: c_uint = 0xacc; pub const XK_rightopentriangle: c_uint = 0xacd; pub const XK_emopencircle: c_uint = 0xace; pub const XK_emopenrectangle: c_uint = 0xacf; pub const XK_leftsinglequotemark: c_uint = 0xad0; pub const XK_rightsinglequotemark: c_uint = 0xad1; pub const XK_leftdoublequotemark: c_uint = 0xad2; pub const XK_rightdoublequotemark: c_uint = 0xad3; pub const XK_prescription: c_uint = 0xad4; pub const XK_minutes: c_uint = 0xad6; pub const XK_seconds: c_uint = 0xad7; pub const XK_latincross: c_uint = 0xad9; pub const XK_hexagram: c_uint = 0xada; pub const XK_filledrectbullet: c_uint = 0xadb; pub const XK_filledlefttribullet: c_uint = 0xadc; pub const XK_filledrighttribullet: c_uint = 0xadd; pub const XK_emfilledcircle: c_uint = 0xade; pub const XK_emfilledrect: c_uint = 0xadf; pub const XK_enopencircbullet: c_uint = 0xae0; pub const XK_enopensquarebullet: c_uint = 0xae1; pub const XK_openrectbullet: c_uint = 0xae2; pub const XK_opentribulletup: c_uint = 0xae3; pub const XK_opentribulletdown: c_uint = 0xae4; pub const XK_openstar: c_uint = 0xae5; pub const XK_enfilledcircbullet: c_uint = 0xae6; pub const XK_enfilledsqbullet: c_uint = 0xae7; pub const XK_filledtribulletup: c_uint = 0xae8; pub const XK_filledtribulletdown: c_uint = 0xae9; pub const XK_leftpointer: c_uint = 0xaea; pub const XK_rightpointer: c_uint = 0xaeb; pub const XK_club: c_uint = 0xaec; pub const XK_diamond: c_uint = 0xaed; pub const XK_heart: c_uint = 0xaee; pub const XK_maltesecross: c_uint = 0xaf0; pub const XK_dagger: c_uint = 0xaf1; pub const XK_doubledagger: c_uint = 0xaf2; pub const XK_checkmark: c_uint = 0xaf3; pub const XK_ballotcross: c_uint = 0xaf4; pub const XK_musicalsharp: c_uint = 0xaf5; pub const XK_musicalflat: c_uint = 0xaf6; pub const XK_malesymbol: c_uint = 0xaf7; pub const XK_femalesymbol: c_uint = 0xaf8; pub const XK_telephone: c_uint = 0xaf9; pub const XK_telephonerecorder: c_uint = 0xafa; pub const XK_phonographcopyright: c_uint = 0xafb; pub const XK_caret: c_uint = 0xafc; pub const XK_singlelowquotemark: c_uint = 0xafd; pub const XK_doublelowquotemark: c_uint = 0xafe; pub const XK_cursor: c_uint = 0xaff; pub const XK_leftcaret: c_uint = 0xba3; pub const XK_rightcaret: c_uint = 0xba6; pub const XK_downcaret: c_uint = 0xba8; pub const XK_upcaret: c_uint = 0xba9; pub const XK_overbar: c_uint = 0xbc0; pub const XK_downtack: c_uint = 0xbc2; pub const XK_upshoe: c_uint = 0xbc3; pub const XK_downstile: c_uint = 0xbc4; pub const XK_underbar: c_uint = 0xbc6; pub const XK_jot: c_uint = 0xbca; pub const XK_quad: c_uint = 0xbcc; pub const XK_uptack: c_uint = 0xbce; pub const XK_circle: c_uint = 0xbcf; pub const XK_upstile: c_uint = 0xbd3; pub const XK_downshoe: c_uint = 0xbd6; pub const XK_rightshoe: c_uint = 0xbd8; pub const XK_leftshoe: c_uint = 0xbda; pub const XK_lefttack: c_uint = 0xbdc; pub const XK_righttack: c_uint = 0xbfc; pub const XK_hebrew_doublelowline: c_uint = 0xcdf; pub const XK_hebrew_aleph: c_uint = 0xce0; pub const XK_hebrew_bet: c_uint = 0xce1; pub const XK_hebrew_beth: c_uint = 0xce1; pub const XK_hebrew_gimel: c_uint = 0xce2; pub const XK_hebrew_gimmel: c_uint = 0xce2; pub const XK_hebrew_dalet: c_uint = 0xce3; pub const XK_hebrew_daleth: c_uint = 0xce3; pub const XK_hebrew_he: c_uint = 0xce4; pub const XK_hebrew_waw: c_uint = 0xce5; pub const XK_hebrew_zain: c_uint = 0xce6; pub const XK_hebrew_zayin: c_uint = 0xce6; pub const XK_hebrew_chet: c_uint = 0xce7; pub const XK_hebrew_het: c_uint = 0xce7; pub const XK_hebrew_tet: c_uint = 0xce8; pub const XK_hebrew_teth: c_uint = 0xce8; pub const XK_hebrew_yod: c_uint = 0xce9; pub const XK_hebrew_finalkaph: c_uint = 0xcea; pub const XK_hebrew_kaph: c_uint = 0xceb; pub const XK_hebrew_lamed: c_uint = 0xcec; pub const XK_hebrew_finalmem: c_uint = 0xced; pub const XK_hebrew_mem: c_uint = 0xcee; pub const XK_hebrew_finalnun: c_uint = 0xcef; pub const XK_hebrew_nun: c_uint = 0xcf0; pub const XK_hebrew_samech: c_uint = 0xcf1; pub const XK_hebrew_samekh: c_uint = 0xcf1; pub const XK_hebrew_ayin: c_uint = 0xcf2; pub const XK_hebrew_finalpe: c_uint = 0xcf3; pub const XK_hebrew_pe: c_uint = 0xcf4; pub const XK_hebrew_finalzade: c_uint = 0xcf5; pub const XK_hebrew_finalzadi: c_uint = 0xcf5; pub const XK_hebrew_zade: c_uint = 0xcf6; pub const XK_hebrew_zadi: c_uint = 0xcf6; pub const XK_hebrew_qoph: c_uint = 0xcf7; pub const XK_hebrew_kuf: c_uint = 0xcf7; pub const XK_hebrew_resh: c_uint = 0xcf8; pub const XK_hebrew_shin: c_uint = 0xcf9; pub const XK_hebrew_taw: c_uint = 0xcfa; pub const XK_hebrew_taf: c_uint = 0xcfa; pub const XK_Hebrew_switch: c_uint = 0xFF7E; pub const XF86XK_ModeLock: c_uint = 0x1008FF01; pub const XF86XK_MonBrightnessUp: c_uint = 0x1008FF02; pub const XF86XK_MonBrightnessDown: c_uint = 0x1008FF03; pub const XF86XK_KbdLightOnOff: c_uint = 0x1008FF04; pub const XF86XK_KbdBrightnessUp: c_uint = 0x1008FF05; pub const XF86XK_KbdBrightnessDown: c_uint = 0x1008FF06; pub const XF86XK_Standby: c_uint = 0x1008FF10; pub const XF86XK_AudioLowerVolume: c_uint = 0x1008FF11; pub const XF86XK_AudioMute: c_uint = 0x1008FF12; pub const XF86XK_AudioRaiseVolume: c_uint = 0x1008FF13; pub const XF86XK_AudioPlay: c_uint = 0x1008FF14; pub const XF86XK_AudioStop: c_uint = 0x1008FF15; pub const XF86XK_AudioPrev: c_uint = 0x1008FF16; pub const XF86XK_AudioNext: c_uint = 0x1008FF17; pub const XF86XK_HomePage: c_uint = 0x1008FF18; pub const XF86XK_Mail: c_uint = 0x1008FF19; pub const XF86XK_Start: c_uint = 0x1008FF1A; pub const XF86XK_Search: c_uint = 0x1008FF1B; pub const XF86XK_AudioRecord: c_uint = 0x1008FF1C; pub const XF86XK_Calculator: c_uint = 0x1008FF1D; pub const XF86XK_Memo: c_uint = 0x1008FF1E; pub const XF86XK_ToDoList: c_uint = 0x1008FF1F; pub const XF86XK_Calendar: c_uint = 0x1008FF20; pub const XF86XK_PowerDown: c_uint = 0x1008FF21; pub const XF86XK_ContrastAdjust: c_uint = 0x1008FF22; pub const XF86XK_RockerUp: c_uint = 0x1008FF23; pub const XF86XK_RockerDown: c_uint = 0x1008FF24; pub const XF86XK_RockerEnter: c_uint = 0x1008FF25; pub const XF86XK_Back: c_uint = 0x1008FF26; pub const XF86XK_Forward: c_uint = 0x1008FF27; pub const XF86XK_Stop: c_uint = 0x1008FF28; pub const XF86XK_Refresh: c_uint = 0x1008FF29; pub const XF86XK_PowerOff: c_uint = 0x1008FF2A; pub const XF86XK_WakeUp: c_uint = 0x1008FF2B; pub const XF86XK_Eject: c_uint = 0x1008FF2C; pub const XF86XK_ScreenSaver: c_uint = 0x1008FF2D; pub const XF86XK_WWW: c_uint = 0x1008FF2E; pub const XF86XK_Sleep: c_uint = 0x1008FF2F; pub const XF86XK_Favorites: c_uint = 0x1008FF30; pub const XF86XK_AudioPause: c_uint = 0x1008FF31; pub const XF86XK_AudioMedia: c_uint = 0x1008FF32; pub const XF86XK_MyComputer: c_uint = 0x1008FF33; pub const XF86XK_VendorHome: c_uint = 0x1008FF34; pub const XF86XK_LightBulb: c_uint = 0x1008FF35; pub const XF86XK_Shop: c_uint = 0x1008FF36; pub const XF86XK_History: c_uint = 0x1008FF37; pub const XF86XK_OpenURL: c_uint = 0x1008FF38; pub const XF86XK_AddFavorite: c_uint = 0x1008FF39; pub const XF86XK_HotLinks: c_uint = 0x1008FF3A; pub const XF86XK_BrightnessAdjust: c_uint = 0x1008FF3B; pub const XF86XK_Finance: c_uint = 0x1008FF3C; pub const XF86XK_Community: c_uint = 0x1008FF3D; pub const XF86XK_AudioRewind: c_uint = 0x1008FF3E; pub const XF86XK_BackForward: c_uint = 0x1008FF3F; pub const XF86XK_Launch0: c_uint = 0x1008FF40; pub const XF86XK_Launch1: c_uint = 0x1008FF41; pub const XF86XK_Launch2: c_uint = 0x1008FF42; pub const XF86XK_Launch3: c_uint = 0x1008FF43; pub const XF86XK_Launch4: c_uint = 0x1008FF44; pub const XF86XK_Launch5: c_uint = 0x1008FF45; pub const XF86XK_Launch6: c_uint = 0x1008FF46; pub const XF86XK_Launch7: c_uint = 0x1008FF47; pub const XF86XK_Launch8: c_uint = 0x1008FF48; pub const XF86XK_Launch9: c_uint = 0x1008FF49; pub const XF86XK_LaunchA: c_uint = 0x1008FF4A; pub const XF86XK_LaunchB: c_uint = 0x1008FF4B; pub const XF86XK_LaunchC: c_uint = 0x1008FF4C; pub const XF86XK_LaunchD: c_uint = 0x1008FF4D; pub const XF86XK_LaunchE: c_uint = 0x1008FF4E; pub const XF86XK_LaunchF: c_uint = 0x1008FF4F; pub const XF86XK_ApplicationLeft: c_uint = 0x1008FF50; pub const XF86XK_ApplicationRight: c_uint = 0x1008FF51; pub const XF86XK_Book: c_uint = 0x1008FF52; pub const XF86XK_CD: c_uint = 0x1008FF53; pub const XF86XK_Calculater: c_uint = 0x1008FF54; pub const XF86XK_Clear: c_uint = 0x1008FF55; pub const XF86XK_Close: c_uint = 0x1008FF56; pub const XF86XK_Copy: c_uint = 0x1008FF57; pub const XF86XK_Cut: c_uint = 0x1008FF58; pub const XF86XK_Display: c_uint = 0x1008FF59; pub const XF86XK_DOS: c_uint = 0x1008FF5A; pub const XF86XK_Documents: c_uint = 0x1008FF5B; pub const XF86XK_Excel: c_uint = 0x1008FF5C; pub const XF86XK_Explorer: c_uint = 0x1008FF5D; pub const XF86XK_Game: c_uint = 0x1008FF5E; pub const XF86XK_Go: c_uint = 0x1008FF5F; pub const XF86XK_iTouch: c_uint = 0x1008FF60; pub const XF86XK_LogOff: c_uint = 0x1008FF61; pub const XF86XK_Market: c_uint = 0x1008FF62; pub const XF86XK_Meeting: c_uint = 0x1008FF63; pub const XF86XK_MenuKB: c_uint = 0x1008FF65; pub const XF86XK_MenuPB: c_uint = 0x1008FF66; pub const XF86XK_MySites: c_uint = 0x1008FF67; pub const XF86XK_New: c_uint = 0x1008FF68; pub const XF86XK_News: c_uint = 0x1008FF69; pub const XF86XK_OfficeHome: c_uint = 0x1008FF6A; pub const XF86XK_Open: c_uint = 0x1008FF6B; pub const XF86XK_Option: c_uint = 0x1008FF6C; pub const XF86XK_Paste: c_uint = 0x1008FF6D; pub const XF86XK_Phone: c_uint = 0x1008FF6E; pub const XF86XK_Q: c_uint = 0x1008FF70; pub const XF86XK_Reply: c_uint = 0x1008FF72; pub const XF86XK_Reload: c_uint = 0x1008FF73; pub const XF86XK_RotateWindows: c_uint = 0x1008FF74; pub const XF86XK_RotationPB: c_uint = 0x1008FF75; pub const XF86XK_RotationKB: c_uint = 0x1008FF76; pub const XF86XK_Save: c_uint = 0x1008FF77; pub const XF86XK_ScrollUp: c_uint = 0x1008FF78; pub const XF86XK_ScrollDown: c_uint = 0x1008FF79; pub const XF86XK_ScrollClick: c_uint = 0x1008FF7A; pub const XF86XK_Send: c_uint = 0x1008FF7B; pub const XF86XK_Spell: c_uint = 0x1008FF7C; pub const XF86XK_SplitScreen: c_uint = 0x1008FF7D; pub const XF86XK_Support: c_uint = 0x1008FF7E; pub const XF86XK_TaskPane: c_uint = 0x1008FF7F; pub const XF86XK_Terminal: c_uint = 0x1008FF80; pub const XF86XK_Tools: c_uint = 0x1008FF81; pub const XF86XK_Travel: c_uint = 0x1008FF82; pub const XF86XK_UserPB: c_uint = 0x1008FF84; pub const XF86XK_User1KB: c_uint = 0x1008FF85; pub const XF86XK_User2KB: c_uint = 0x1008FF86; pub const XF86XK_Video: c_uint = 0x1008FF87; pub const XF86XK_WheelButton: c_uint = 0x1008FF88; pub const XF86XK_Word: c_uint = 0x1008FF89; pub const XF86XK_Xfer: c_uint = 0x1008FF8A; pub const XF86XK_ZoomIn: c_uint = 0x1008FF8B; pub const XF86XK_ZoomOut: c_uint = 0x1008FF8C; pub const XF86XK_Away: c_uint = 0x1008FF8D; pub const XF86XK_Messenger: c_uint = 0x1008FF8E; pub const XF86XK_WebCam: c_uint = 0x1008FF8F; pub const XF86XK_MailForward: c_uint = 0x1008FF90; pub const XF86XK_Pictures: c_uint = 0x1008FF91; pub const XF86XK_Music: c_uint = 0x1008FF92; pub const XF86XK_Battery: c_uint = 0x1008FF93; pub const XF86XK_Bluetooth: c_uint = 0x1008FF94; pub const XF86XK_WLAN: c_uint = 0x1008FF95; pub const XF86XK_UWB: c_uint = 0x1008FF96; pub const XF86XK_AudioForward: c_uint = 0x1008FF97; pub const XF86XK_AudioRepeat: c_uint = 0x1008FF98; pub const XF86XK_AudioRandomPlay: c_uint = 0x1008FF99; pub const XF86XK_Subtitle: c_uint = 0x1008FF9A; pub const XF86XK_AudioCycleTrack: c_uint = 0x1008FF9B; pub const XF86XK_CycleAngle: c_uint = 0x1008FF9C; pub const XF86XK_FrameBack: c_uint = 0x1008FF9D; pub const XF86XK_FrameForward: c_uint = 0x1008FF9E; pub const XF86XK_Time: c_uint = 0x1008FF9F; pub const XF86XK_Select: c_uint = 0x1008FFA0; pub const XF86XK_View: c_uint = 0x1008FFA1; pub const XF86XK_TopMenu: c_uint = 0x1008FFA2; pub const XF86XK_Red: c_uint = 0x1008FFA3; pub const XF86XK_Green: c_uint = 0x1008FFA4; pub const XF86XK_Yellow: c_uint = 0x1008FFA5; pub const XF86XK_Blue: c_uint = 0x1008FFA6; pub const XF86XK_Suspend: c_uint = 0x1008FFA7; pub const XF86XK_Hibernate: c_uint = 0x1008FFA8; pub const XF86XK_TouchpadToggle: c_uint = 0x1008FFA9; pub const XF86XK_TouchpadOn: c_uint = 0x1008FFB0; pub const XF86XK_TouchpadOff: c_uint = 0x1008FFB1; pub const XF86XK_AudioMicMute: c_uint = 0x1008FFB2; pub const XF86XK_Switch_VT_1: c_uint = 0x1008FE01; pub const XF86XK_Switch_VT_2: c_uint = 0x1008FE02; pub const XF86XK_Switch_VT_3: c_uint = 0x1008FE03; pub const XF86XK_Switch_VT_4: c_uint = 0x1008FE04; pub const XF86XK_Switch_VT_5: c_uint = 0x1008FE05; pub const XF86XK_Switch_VT_6: c_uint = 0x1008FE06; pub const XF86XK_Switch_VT_7: c_uint = 0x1008FE07; pub const XF86XK_Switch_VT_8: c_uint = 0x1008FE08; pub const XF86XK_Switch_VT_9: c_uint = 0x1008FE09; pub const XF86XK_Switch_VT_10: c_uint = 0x1008FE0A; pub const XF86XK_Switch_VT_11: c_uint = 0x1008FE0B; pub const XF86XK_Switch_VT_12: c_uint = 0x1008FE0C; pub const XF86XK_Ungrab: c_uint = 0x1008FE20; pub const XF86XK_ClearGrab: c_uint = 0x1008FE21; pub const XF86XK_Next_VMode: c_uint = 0x1008FE22; pub const XF86XK_Prev_VMode: c_uint = 0x1008FE23; pub const XF86XK_LogWindowTree: c_uint = 0x1008FE24; pub const XF86XK_LogGrabInfo: c_uint = 0x1008FE25; pub const XK_ISO_Lock: c_uint = 0xfe01; pub const XK_ISO_Level2_Latch: c_uint = 0xfe02; pub const XK_ISO_Level3_Shift: c_uint = 0xfe03; pub const XK_ISO_Level3_Latch: c_uint = 0xfe04; pub const XK_ISO_Level3_Lock: c_uint = 0xfe05; pub const XK_ISO_Level5_Shift: c_uint = 0xfe11; pub const XK_ISO_Level5_Latch: c_uint = 0xfe12; pub const XK_ISO_Level5_Lock: c_uint = 0xfe13; pub const XK_ISO_Group_Shift: c_uint = 0xff7e; pub const XK_ISO_Group_Latch: c_uint = 0xfe06; pub const XK_ISO_Group_Lock: c_uint = 0xfe07; pub const XK_ISO_Next_Group: c_uint = 0xfe08; pub const XK_ISO_Next_Group_Lock: c_uint = 0xfe09; pub const XK_ISO_Prev_Group: c_uint = 0xfe0a; pub const XK_ISO_Prev_Group_Lock: c_uint = 0xfe0b; pub const XK_ISO_First_Group: c_uint = 0xfe0c; pub const XK_ISO_First_Group_Lock: c_uint = 0xfe0d; pub const XK_ISO_Last_Group: c_uint = 0xfe0e; pub const XK_ISO_Last_Group_Lock: c_uint = 0xfe0f; pub const XK_ISO_Left_Tab: c_uint = 0xfe20; pub const XK_ISO_Move_Line_Up: c_uint = 0xfe21; pub const XK_ISO_Move_Line_Down: c_uint = 0xfe22; pub const XK_ISO_Partial_Line_Up: c_uint = 0xfe23; pub const XK_ISO_Partial_Line_Down: c_uint = 0xfe24; pub const XK_ISO_Partial_Space_Left: c_uint = 0xfe25; pub const XK_ISO_Partial_Space_Right: c_uint = 0xfe26; pub const XK_ISO_Set_Margin_Left: c_uint = 0xfe27; pub const XK_ISO_Set_Margin_Right: c_uint = 0xfe28; pub const XK_ISO_Release_Margin_Left: c_uint = 0xfe29; pub const XK_ISO_Release_Margin_Right: c_uint = 0xfe2a; pub const XK_ISO_Release_Both_Margins: c_uint = 0xfe2b; pub const XK_ISO_Fast_Cursor_Left: c_uint = 0xfe2c; pub const XK_ISO_Fast_Cursor_Right: c_uint = 0xfe2d; pub const XK_ISO_Fast_Cursor_Up: c_uint = 0xfe2e; pub const XK_ISO_Fast_Cursor_Down: c_uint = 0xfe2f; pub const XK_ISO_Continuous_Underline: c_uint = 0xfe30; pub const XK_ISO_Discontinuous_Underline: c_uint = 0xfe31; pub const XK_ISO_Emphasize: c_uint = 0xfe32; pub const XK_ISO_Center_Object: c_uint = 0xfe33; pub const XK_ISO_Enter: c_uint = 0xfe34; pub const XK_dead_grave: c_uint = 0xfe50; pub const XK_dead_acute: c_uint = 0xfe51; pub const XK_dead_circumflex: c_uint = 0xfe52; pub const XK_dead_tilde: c_uint = 0xfe53; pub const XK_dead_perispomeni: c_uint = 0xfe53; pub const XK_dead_macron: c_uint = 0xfe54; pub const XK_dead_breve: c_uint = 0xfe55; pub const XK_dead_abovedot: c_uint = 0xfe56; pub const XK_dead_diaeresis: c_uint = 0xfe57; pub const XK_dead_abovering: c_uint = 0xfe58; pub const XK_dead_doubleacute: c_uint = 0xfe59; pub const XK_dead_caron: c_uint = 0xfe5a; pub const XK_dead_cedilla: c_uint = 0xfe5b; pub const XK_dead_ogonek: c_uint = 0xfe5c; pub const XK_dead_iota: c_uint = 0xfe5d; pub const XK_dead_voiced_sound: c_uint = 0xfe5e; pub const XK_dead_semivoiced_sound: c_uint = 0xfe5f; pub const XK_dead_belowdot: c_uint = 0xfe60; pub const XK_dead_hook: c_uint = 0xfe61; pub const XK_dead_horn: c_uint = 0xfe62; pub const XK_dead_stroke: c_uint = 0xfe63; pub const XK_dead_abovecomma: c_uint = 0xfe64; pub const XK_dead_psili: c_uint = 0xfe64; pub const XK_dead_abovereversedcomma: c_uint = 0xfe65; pub const XK_dead_dasia: c_uint = 0xfe65; pub const XK_dead_doublegrave: c_uint = 0xfe66; pub const XK_dead_belowring: c_uint = 0xfe67; pub const XK_dead_belowmacron: c_uint = 0xfe68; pub const XK_dead_belowcircumflex: c_uint = 0xfe69; pub const XK_dead_belowtilde: c_uint = 0xfe6a; pub const XK_dead_belowbreve: c_uint = 0xfe6b; pub const XK_dead_belowdiaeresis: c_uint = 0xfe6c; pub const XK_dead_invertedbreve: c_uint = 0xfe6d; pub const XK_dead_belowcomma: c_uint = 0xfe6e; pub const XK_dead_currency: c_uint = 0xfe6f; pub const XK_dead_lowline: c_uint = 0xfe90; pub const XK_dead_aboveverticalline: c_uint = 0xfe91; pub const XK_dead_belowverticalline: c_uint = 0xfe92; pub const XK_dead_longsolidusoverlay: c_uint = 0xfe93; pub const XK_dead_a: c_uint = 0xfe80; pub const XK_dead_A: c_uint = 0xfe81; pub const XK_dead_e: c_uint = 0xfe82; pub const XK_dead_E: c_uint = 0xfe83; pub const XK_dead_i: c_uint = 0xfe84; pub const XK_dead_I: c_uint = 0xfe85; pub const XK_dead_o: c_uint = 0xfe86; pub const XK_dead_O: c_uint = 0xfe87; pub const XK_dead_u: c_uint = 0xfe88; pub const XK_dead_U: c_uint = 0xfe89; pub const XK_dead_small_schwa: c_uint = 0xfe8a; pub const XK_dead_capital_schwa: c_uint = 0xfe8b; pub const XK_dead_greek: c_uint = 0xfe8c; pub const XK_First_Virtual_Screen: c_uint = 0xfed0; pub const XK_Prev_Virtual_Screen: c_uint = 0xfed1; pub const XK_Next_Virtual_Screen: c_uint = 0xfed2; pub const XK_Last_Virtual_Screen: c_uint = 0xfed4; pub const XK_Terminate_Server: c_uint = 0xfed5; pub const XK_AccessX_Enable: c_uint = 0xfe70; pub const XK_AccessX_Feedback_Enable: c_uint = 0xfe71; pub const XK_RepeatKeys_Enable: c_uint = 0xfe72; pub const XK_SlowKeys_Enable: c_uint = 0xfe73; pub const XK_BounceKeys_Enable: c_uint = 0xfe74; pub const XK_StickyKeys_Enable: c_uint = 0xfe75; pub const XK_MouseKeys_Enable: c_uint = 0xfe76; pub const XK_MouseKeys_Accel_Enable: c_uint = 0xfe77; pub const XK_Overlay1_Enable: c_uint = 0xfe78; pub const XK_Overlay2_Enable: c_uint = 0xfe79; pub const XK_AudibleBell_Enable: c_uint = 0xfe7a; pub const XK_Pointer_Left: c_uint = 0xfee0; pub const XK_Pointer_Right: c_uint = 0xfee1; pub const XK_Pointer_Up: c_uint = 0xfee2; pub const XK_Pointer_Down: c_uint = 0xfee3; pub const XK_Pointer_UpLeft: c_uint = 0xfee4; pub const XK_Pointer_UpRight: c_uint = 0xfee5; pub const XK_Pointer_DownLeft: c_uint = 0xfee6; pub const XK_Pointer_DownRight: c_uint = 0xfee7; pub const XK_Pointer_Button_Dflt: c_uint = 0xfee8; pub const XK_Pointer_Button1: c_uint = 0xfee9; pub const XK_Pointer_Button2: c_uint = 0xfeea; pub const XK_Pointer_Button3: c_uint = 0xfeeb; pub const XK_Pointer_Button4: c_uint = 0xfeec; pub const XK_Pointer_Button5: c_uint = 0xfeed; pub const XK_Pointer_DblClick_Dflt: c_uint = 0xfeee; pub const XK_Pointer_DblClick1: c_uint = 0xfeef; pub const XK_Pointer_DblClick2: c_uint = 0xfef0; pub const XK_Pointer_DblClick3: c_uint = 0xfef1; pub const XK_Pointer_DblClick4: c_uint = 0xfef2; pub const XK_Pointer_DblClick5: c_uint = 0xfef3; pub const XK_Pointer_Drag_Dflt: c_uint = 0xfef4; pub const XK_Pointer_Drag1: c_uint = 0xfef5; pub const XK_Pointer_Drag2: c_uint = 0xfef6; pub const XK_Pointer_Drag3: c_uint = 0xfef7; pub const XK_Pointer_Drag4: c_uint = 0xfef8; pub const XK_Pointer_Drag5: c_uint = 0xfefd; pub const XK_Pointer_EnableKeys: c_uint = 0xfef9; pub const XK_Pointer_Accelerate: c_uint = 0xfefa; pub const XK_Pointer_DfltBtnNext: c_uint = 0xfefb; pub const XK_Pointer_DfltBtnPrev: c_uint = 0xfefc; pub const XK_ch: c_uint = 0xfea0; pub const XK_Ch: c_uint = 0xfea1; pub const XK_CH: c_uint = 0xfea2; pub const XK_c_h: c_uint = 0xfea3; pub const XK_C_h: c_uint = 0xfea4; pub const XK_C_H: c_uint = 0xfea5; x11-2.18.2/src/lib.rs010064400017500001750000000011761361324422500123500ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(improper_ctypes)] extern crate libc; #[macro_use] mod link; mod internal; #[macro_use] pub mod xlib; pub mod dpms; pub mod glx; pub mod keysym; pub mod xcursor; pub mod xf86vmode; pub mod xfixes; pub mod xft; pub mod xinerama; pub mod xinput; pub mod xinput2; pub mod xmd; pub mod xmu; pub mod xrandr; pub mod xrecord; pub mod xrender; pub mod xss; pub mod xt; pub mod xtest; pub mod xlib_xcb; x11-2.18.2/src/link.rs010064400017500001750000000013651361324422500125370ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. macro_rules! x11_link { { $struct_name:ident, $pkg_name:expr, [$($lib_name:expr),*], $nsyms:expr, $(pub fn $fn_name:ident ($($param_name:ident : $param_type:ty),*) -> $ret_type:ty,)* variadic: $(pub fn $vfn_name:ident ($($vparam_name: ident : $vparam_type:ty),+) -> $vret_type:ty,)* globals: $(pub static $var_name:ident : $var_type:ty,)* } => { extern "C" { $(pub fn $fn_name ($($param_name : $param_type),*) -> $ret_type;)* $(pub fn $vfn_name ($($vparam_name : $vparam_type),+, ...) -> $vret_type;)* } extern { $(pub static $var_name : $var_type;)* } } } x11-2.18.2/src/xcursor.rs010064400017500001750000000177001361324422500133070ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::{ c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void, }; use libc::FILE; use ::xlib::{ Cursor, Display, XColor, XImage, }; // // functions // x11_link! { Xcursor, xcursor, ["libXcursor.so.1", "libXcursor.so"], 59, pub fn XcursorAnimateCreate (_1: *mut XcursorCursors) -> *mut XcursorAnimate, pub fn XcursorAnimateDestroy (_1: *mut XcursorAnimate) -> (), pub fn XcursorAnimateNext (_1: *mut XcursorAnimate) -> c_ulong, pub fn XcursorCommentCreate (_2: c_uint, _1: c_int) -> *mut XcursorComment, pub fn XcursorCommentDestroy (_1: *mut XcursorComment) -> (), pub fn XcursorCommentsCreate (_1: c_int) -> *mut XcursorComments, pub fn XcursorCommentsDestroy (_1: *mut XcursorComments) -> (), pub fn XcursorCursorsCreate (_2: *mut Display, _1: c_int) -> *mut XcursorCursors, pub fn XcursorCursorsDestroy (_1: *mut XcursorCursors) -> (), pub fn XcursorFileLoad (_3: *mut FILE, _2: *mut *mut XcursorComments, _1: *mut *mut XcursorImages) -> c_int, pub fn XcursorFileLoadAllImages (_1: *mut FILE) -> *mut XcursorImages, pub fn XcursorFileLoadImage (_2: *mut FILE, _1: c_int) -> *mut XcursorImage, pub fn XcursorFileLoadImages (_2: *mut FILE, _1: c_int) -> *mut XcursorImages, pub fn XcursorFilenameLoad (_3: *const c_char, _2: *mut *mut XcursorComments, _1: *mut *mut XcursorImages) -> c_int, pub fn XcursorFilenameLoadAllImages (_1: *const c_char) -> *mut XcursorImages, pub fn XcursorFilenameLoadCursor (_2: *mut Display, _1: *const c_char) -> c_ulong, pub fn XcursorFilenameLoadCursors (_2: *mut Display, _1: *const c_char) -> *mut XcursorCursors, pub fn XcursorFilenameLoadImage (_2: *const c_char, _1: c_int) -> *mut XcursorImage, pub fn XcursorFilenameLoadImages (_2: *const c_char, _1: c_int) -> *mut XcursorImages, pub fn XcursorFilenameSave (_3: *const c_char, _2: *const XcursorComments, _1: *const XcursorImages) -> c_int, pub fn XcursorFilenameSaveImages (_2: *const c_char, _1: *const XcursorImages) -> c_int, pub fn XcursorFileSave (_3: *mut FILE, _2: *const XcursorComments, _1: *const XcursorImages) -> c_int, pub fn XcursorFileSaveImages (_2: *mut FILE, _1: *const XcursorImages) -> c_int, pub fn XcursorGetDefaultSize (_1: *mut Display) -> c_int, pub fn XcursorGetTheme (_1: *mut Display) -> *mut c_char, pub fn XcursorGetThemeCore (_1: *mut Display) -> c_int, pub fn XcursorImageCreate (_2: c_int, _1: c_int) -> *mut XcursorImage, pub fn XcursorImageDestroy (_1: *mut XcursorImage) -> (), pub fn XcursorImageHash (_2: *mut XImage, _1: *mut c_uchar) -> (), pub fn XcursorImageLoadCursor (_2: *mut Display, _1: *const XcursorImage) -> c_ulong, pub fn XcursorImagesCreate (_1: c_int) -> *mut XcursorImages, pub fn XcursorImagesDestroy (_1: *mut XcursorImages) -> (), pub fn XcursorImagesLoadCursor (_2: *mut Display, _1: *const XcursorImages) -> c_ulong, pub fn XcursorImagesLoadCursors (_2: *mut Display, _1: *const XcursorImages) -> *mut XcursorCursors, pub fn XcursorImagesSetName (_2: *mut XcursorImages, _1: *const c_char) -> (), pub fn XcursorLibraryLoadCursor (_2: *mut Display, _1: *const c_char) -> c_ulong, pub fn XcursorLibraryLoadCursors (_2: *mut Display, _1: *const c_char) -> *mut XcursorCursors, pub fn XcursorLibraryLoadImage (_3: *const c_char, _2: *const c_char, _1: c_int) -> *mut XcursorImage, pub fn XcursorLibraryLoadImages (_3: *const c_char, _2: *const c_char, _1: c_int) -> *mut XcursorImages, pub fn XcursorLibraryPath () -> *const c_char, pub fn XcursorLibraryShape (_1: *const c_char) -> c_int, pub fn XcursorNoticeCreateBitmap (_4: *mut Display, _3: c_ulong, _2: c_uint, _1: c_uint) -> (), pub fn XcursorNoticePutBitmap (_3: *mut Display, _2: c_ulong, _1: *mut XImage) -> (), pub fn XcursorSetDefaultSize (_2: *mut Display, _1: c_int) -> c_int, pub fn XcursorSetTheme (_2: *mut Display, _1: *const c_char) -> c_int, pub fn XcursorSetThemeCore (_2: *mut Display, _1: c_int) -> c_int, pub fn XcursorShapeLoadCursor (_2: *mut Display, _1: c_uint) -> c_ulong, pub fn XcursorShapeLoadCursors (_2: *mut Display, _1: c_uint) -> *mut XcursorCursors, pub fn XcursorShapeLoadImage (_3: c_uint, _2: *const c_char, _1: c_int) -> *mut XcursorImage, pub fn XcursorShapeLoadImages (_3: c_uint, _2: *const c_char, _1: c_int) -> *mut XcursorImages, pub fn XcursorSupportsAnim (_1: *mut Display) -> c_int, pub fn XcursorSupportsARGB (_1: *mut Display) -> c_int, pub fn XcursorTryShapeBitmapCursor (_7: *mut Display, _6: c_ulong, _5: c_ulong, _4: *mut XColor, _3: *mut XColor, _2: c_uint, _1: c_uint) -> c_ulong, pub fn XcursorTryShapeCursor (_7: *mut Display, _6: c_ulong, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *const XColor, _1: *const XColor) -> c_ulong, pub fn XcursorXcFileLoad (_3: *mut XcursorFile, _2: *mut *mut XcursorComments, _1: *mut *mut XcursorImages) -> c_int, pub fn XcursorXcFileLoadAllImages (_1: *mut XcursorFile) -> *mut XcursorImages, pub fn XcursorXcFileLoadImage (_2: *mut XcursorFile, _1: c_int) -> *mut XcursorImage, pub fn XcursorXcFileLoadImages (_2: *mut XcursorFile, _1: c_int) -> *mut XcursorImages, pub fn XcursorXcFileSave (_3: *mut XcursorFile, _2: *const XcursorComments, _1: *const XcursorImages) -> c_int, variadic: globals: } // // types // pub type XcursorBool = c_int; pub type XcursorDim = XcursorUInt; pub type XcursorPixel = XcursorUInt; pub type XcursorUInt = c_uint; #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct _XcursorAnimate { pub cursors: *mut XcursorCursors, pub sequence: c_int, } pub type XcursorAnimate = _XcursorAnimate; #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct _XcursorChunkHeader { pub header: XcursorUInt, pub type_: XcursorUInt, pub subtype: XcursorUInt, pub version: XcursorUInt, } pub type XcursorChunkHeader = _XcursorChunkHeader; #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct _XcursorComment { pub version: XcursorUInt, pub comment_type: XcursorUInt, pub comment: *mut c_char, } pub type XcursorComment = _XcursorComment; #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct _XcursorComments { pub ncomment: c_int, pub comments: *mut *mut XcursorComment, } pub type XcursorComments = _XcursorComments; #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct _XcursorCursors { pub dpy: *mut Display, pub ref_: c_int, pub ncursor: c_int, pub cursors: *mut Cursor, } pub type XcursorCursors = _XcursorCursors; #[derive(Debug, Copy)] #[repr(C)] pub struct _XcursorFile { pub closure: *mut c_void, pub read: Option c_int>, pub write: Option c_int>, pub seek: Option c_int>, } pub type XcursorFile = _XcursorFile; impl Clone for _XcursorFile { fn clone (&self) -> _XcursorFile { _XcursorFile { closure: self.closure, read: self.read, write: self.write, seek: self.seek, } } } #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct _XcursorFileHeader { pub magic: XcursorUInt, pub header: XcursorUInt, pub version: XcursorUInt, pub ntoc: XcursorUInt, pub tocs: *mut XcursorFileToc, } pub type XcursorFileHeader = _XcursorFileHeader; #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct _XcursorFileToc { pub type_: XcursorUInt, pub subtype: XcursorUInt, pub position: XcursorUInt, } pub type XcursorFileToc = _XcursorFileToc; #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct _XcursorImage { pub version: XcursorUInt, pub size: XcursorDim, pub width: XcursorDim, pub height: XcursorDim, pub xhot: XcursorDim, pub yhot: XcursorDim, pub delay: XcursorUInt, pub pixels: *mut XcursorPixel, } pub type XcursorImage = _XcursorImage; #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct _XcursorImages { pub nimage: c_int, pub images: *mut *mut XcursorImage, pub name: *mut c_char, } pub type XcursorImages = _XcursorImages; x11-2.18.2/src/xf86vmode.rs010064400017500001750000000105461361324422500134310ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::{ c_char, c_float, c_int, c_uchar, c_uint, c_ulong, c_ushort, }; use ::xlib::{ Bool, Display, Time, Window, XEvent, }; // // functions // x11_link! { Xf86vmode, xxf86vm, ["libXxf86vm.so.1", "libXxf86vm.so"], 22, pub fn XF86VidModeAddModeLine (_4: *mut Display, _3: c_int, _2: *mut XF86VidModeModeInfo, _1: *mut XF86VidModeModeInfo) -> c_int, pub fn XF86VidModeDeleteModeLine (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeModeInfo) -> c_int, pub fn XF86VidModeGetAllModeLines (_4: *mut Display, _3: c_int, _2: *mut c_int, _1: *mut *mut *mut XF86VidModeModeInfo) -> c_int, pub fn XF86VidModeGetDotClocks (_6: *mut Display, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut *mut c_int) -> c_int, pub fn XF86VidModeGetGamma (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeGamma) -> c_int, pub fn XF86VidModeGetGammaRamp (_6: *mut Display, _5: c_int, _4: c_int, _3: *mut c_ushort, _2: *mut c_ushort, _1: *mut c_ushort) -> c_int, pub fn XF86VidModeGetGammaRampSize (_3: *mut Display, _2: c_int, _1: *mut c_int) -> c_int, pub fn XF86VidModeGetModeLine (_4: *mut Display, _3: c_int, _2: *mut c_int, _1: *mut XF86VidModeModeLine) -> c_int, pub fn XF86VidModeGetMonitor (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeMonitor) -> c_int, pub fn XF86VidModeGetPermissions (_3: *mut Display, _2: c_int, _1: *mut c_int) -> c_int, pub fn XF86VidModeGetViewPort (_4: *mut Display, _3: c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XF86VidModeLockModeSwitch (_3: *mut Display, _2: c_int, _1: c_int) -> c_int, pub fn XF86VidModeModModeLine (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeModeLine) -> c_int, pub fn XF86VidModeQueryExtension (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XF86VidModeQueryVersion (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XF86VidModeSetClientVersion (_1: *mut Display) -> c_int, pub fn XF86VidModeSetGamma (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeGamma) -> c_int, pub fn XF86VidModeSetGammaRamp (_6: *mut Display, _5: c_int, _4: c_int, _3: *mut c_ushort, _2: *mut c_ushort, _1: *mut c_ushort) -> c_int, pub fn XF86VidModeSetViewPort (_4: *mut Display, _3: c_int, _2: c_int, _1: c_int) -> c_int, pub fn XF86VidModeSwitchMode (_3: *mut Display, _2: c_int, _1: c_int) -> c_int, pub fn XF86VidModeSwitchToMode (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeModeInfo) -> c_int, pub fn XF86VidModeValidateModeLine (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeModeInfo) -> c_int, variadic: globals: } // // types // #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct XF86VidModeGamma { pub red: c_float, pub green: c_float, pub blue: c_float, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XF86VidModeModeInfo { pub dotclock: c_uint, pub hdisplay: c_ushort, pub hsyncstart: c_ushort, pub hsyncend: c_ushort, pub htotal: c_ushort, pub hskew: c_ushort, pub vdisplay: c_ushort, pub vsyncstart: c_ushort, pub vsyncend: c_ushort, pub vtotal: c_ushort, pub flags: c_uint, pub privsize: c_int, pub private: *mut i32, } #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct XF86VidModeModeLine { pub hdisplay: c_ushort, pub hsyncstart: c_ushort, pub hsyncend: c_ushort, pub htotal: c_ushort, pub hskew: c_ushort, pub vdisplay: c_ushort, pub vsyncstart: c_ushort, pub vsyncend: c_ushort, pub vtotal: c_ushort, pub flags: c_uint, pub privsize: c_int, pub private: *mut i32, } #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct XF86VidModeMonitor { pub vendor: *mut c_char, pub model: *mut c_char, pub EMPTY: c_float, pub nhsync: c_uchar, pub hsync: *mut XF86VidModeSyncRange, pub nvsync: c_uchar, pub vsync: *mut XF86VidModeSyncRange, } #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct XF86VidModeSyncRange { pub hi: c_float, pub lo: c_float, } // // event structures // #[derive(Debug, Clone, Copy)] #[repr(C)] pub struct XF86VidModeNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub root: Window, pub state: c_int, pub kind: c_int, pub forced: Bool, pub time: Time, } event_conversions_and_tests! { xf86vm_notify: XF86VidModeNotifyEvent, } x11-2.18.2/src/xfixes.rs010064400017500001750000000003161361324422500131030ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use ::xlib::XID; // // types // pub type PointerBarrier = XID; x11-2.18.2/src/xft.rs010064400017500001750000000257461361324422500124140ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::*; use xlib::{Display, Region, Visual, XRectangle}; use xrender::{XGlyphInfo, XRenderColor}; // // external types // // freetype pub enum FT_FaceRec {} pub type FT_UInt = c_uint; // fontconfig pub type FcChar32 = c_uint; pub enum FcCharSet {} pub enum FcPattern {} #[repr(C)] pub enum FcEndian { Big, Little } #[repr(C)] pub enum FcResult { Match, NoMatch, TypeMismatch, NoId, OutOfMemory } // // functions // x11_link! { Xft, xft, ["libXft.so.2", "libXft.so"], 77, pub fn XftCharExists (_2: *mut Display, _1: *mut XftFont, _0: c_uint) -> c_int, pub fn XftCharFontSpecRender (_7: *mut Display, _6: c_int, _5: c_ulong, _4: c_ulong, _3: c_int, _2: c_int, _1: *const XftCharFontSpec, _0: c_int) -> (), pub fn XftCharIndex (_2: *mut Display, _1: *mut XftFont, _0: c_uint) -> c_uint, pub fn XftCharSpecRender (_8: *mut Display, _7: c_int, _6: c_ulong, _5: *mut XftFont, _4: c_ulong, _3: c_int, _2: c_int, _1: *const XftCharSpec, _0: c_int) -> (), pub fn XftColorAllocName (_4: *mut Display, _3: *const Visual, _2: c_ulong, _1: *const c_char, _0: *mut XftColor) -> c_int, pub fn XftColorAllocValue (_4: *mut Display, _3: *mut Visual, _2: c_ulong, _1: *const XRenderColor, _0: *mut XftColor) -> c_int, pub fn XftColorFree (_3: *mut Display, _2: *mut Visual, _1: c_ulong, _0: *mut XftColor) -> (), pub fn XftDefaultHasRender (_0: *mut Display) -> c_int, pub fn XftDefaultSet (_1: *mut Display, _0: *mut FcPattern) -> c_int, pub fn XftDefaultSubstitute (_2: *mut Display, _1: c_int, _0: *mut FcPattern) -> (), pub fn XftDrawChange (_1: *mut XftDraw, _0: c_ulong) -> (), pub fn XftDrawCharFontSpec (_3: *mut XftDraw, _2: *const XftColor, _1: *const XftCharFontSpec, _0: c_int) -> (), pub fn XftDrawCharSpec (_4: *mut XftDraw, _3: *const XftColor, _2: *mut XftFont, _1: *const XftCharSpec, _0: c_int) -> (), pub fn XftDrawColormap (_0: *mut XftDraw) -> c_ulong, pub fn XftDrawCreate (_3: *mut Display, _2: c_ulong, _1: *mut Visual, _0: c_ulong) -> *mut XftDraw, pub fn XftDrawCreateAlpha (_2: *mut Display, _1: c_ulong, _0: c_int) -> *mut XftDraw, pub fn XftDrawCreateBitmap (_1: *mut Display, _0: c_ulong) -> *mut XftDraw, pub fn XftDrawDestroy (_0: *mut XftDraw) -> (), pub fn XftDrawDisplay (_0: *mut XftDraw) -> *mut Display, pub fn XftDrawDrawable (_0: *mut XftDraw) -> c_ulong, pub fn XftDrawGlyphFontSpec (_3: *mut XftDraw, _2: *const XftColor, _1: *const XftGlyphFontSpec, _0: c_int) -> (), pub fn XftDrawGlyphs (_6: *mut XftDraw, _5: *const XftColor, _4: *mut XftFont, _3: c_int, _2: c_int, _1: *const c_uint, _0: c_int) -> (), pub fn XftDrawGlyphSpec (_4: *mut XftDraw, _3: *const XftColor, _2: *mut XftFont, _1: *const XftGlyphSpec, _0: c_int) -> (), pub fn XftDrawPicture (_0: *mut XftDraw) -> c_ulong, pub fn XftDrawRect (_5: *mut XftDraw, _4: *const XftColor, _3: c_int, _2: c_int, _1: c_uint, _0: c_uint) -> (), pub fn XftDrawSetClip (_1: *mut XftDraw, _0: Region) -> c_int, pub fn XftDrawSetClipRectangles (_4: *mut XftDraw, _3: c_int, _2: c_int, _1: *const XRectangle, _0: c_int) -> c_int, pub fn XftDrawSetSubwindowMode (_1: *mut XftDraw, _0: c_int) -> (), pub fn XftDrawSrcPicture (_1: *mut XftDraw, _0: *const XftColor) -> c_ulong, pub fn XftDrawString16 (_6: *mut XftDraw, _5: *const XftColor, _4: *mut XftFont, _3: c_int, _2: c_int, _1: *const c_ushort, _0: c_int) -> (), pub fn XftDrawString32 (_6: *mut XftDraw, _5: *const XftColor, _4: *mut XftFont, _3: c_int, _2: c_int, _1: *const c_uint, _0: c_int) -> (), pub fn XftDrawString8 (_6: *mut XftDraw, _5: *const XftColor, _4: *mut XftFont, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (), pub fn XftDrawStringUtf16 (_7: *mut XftDraw, _6: *const XftColor, _5: *mut XftFont, _4: c_int, _3: c_int, _2: *const c_uchar, _1: FcEndian, _0: c_int) -> (), pub fn XftDrawStringUtf8 (_6: *mut XftDraw, _5: *const XftColor, _4: *mut XftFont, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (), pub fn XftDrawVisual (_0: *mut XftDraw) -> *mut Visual, pub fn XftFontCheckGlyph (_5: *mut Display, _4: *mut XftFont, _3: c_int, _2: c_uint, _1: *mut c_uint, _0: *mut c_int) -> c_int, pub fn XftFontClose (_1: *mut Display, _0: *mut XftFont) -> (), pub fn XftFontCopy (_1: *mut Display, _0: *mut XftFont) -> *mut XftFont, pub fn XftFontInfoCreate (_1: *mut Display, _0: *const FcPattern) -> *mut XftFontInfo, pub fn XftFontInfoDestroy (_1: *mut Display, _0: *mut XftFontInfo) -> (), pub fn XftFontInfoEqual (_1: *const XftFontInfo, _0: *const XftFontInfo) -> c_int, pub fn XftFontInfoHash (_0: *const XftFontInfo) -> c_uint, pub fn XftFontLoadGlyphs (_4: *mut Display, _3: *mut XftFont, _2: c_int, _1: *const c_uint, _0: c_int) -> (), pub fn XftFontMatch (_3: *mut Display, _2: c_int, _1: *const FcPattern, _0: *mut FcResult) -> *mut FcPattern, pub fn XftFontOpenInfo (_2: *mut Display, _1: *mut FcPattern, _0: *mut XftFontInfo) -> *mut XftFont, pub fn XftFontOpenName (_2: *mut Display, _1: c_int, _0: *const c_char) -> *mut XftFont, pub fn XftFontOpenPattern (_1: *mut Display, _0: *mut FcPattern) -> *mut XftFont, pub fn XftFontOpenXlfd (_2: *mut Display, _1: c_int, _0: *const c_char) -> *mut XftFont, pub fn XftFontUnloadGlyphs (_3: *mut Display, _2: *mut XftFont, _1: *const c_uint, _0: c_int) -> (), pub fn XftGetVersion () -> c_int, pub fn XftGlyphExtents (_4: *mut Display, _3: *mut XftFont, _2: *const c_uint, _1: c_int, _0: *mut XGlyphInfo) -> (), pub fn XftGlyphFontSpecRender (_7: *mut Display, _6: c_int, _5: c_ulong, _4: c_ulong, _3: c_int, _2: c_int, _1: *const XftGlyphFontSpec, _0: c_int) -> (), pub fn XftGlyphRender (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uint, _0: c_int) -> (), pub fn XftGlyphSpecRender (_8: *mut Display, _7: c_int, _6: c_ulong, _5: *mut XftFont, _4: c_ulong, _3: c_int, _2: c_int, _1: *const XftGlyphSpec, _0: c_int) -> (), pub fn XftInit (_0: *const c_char) -> c_int, pub fn XftInitFtLibrary () -> c_int, pub fn XftLockFace (_0: *mut XftFont) -> *mut FT_FaceRec, pub fn XftNameParse (_0: *const c_char) -> *mut FcPattern, pub fn XftNameUnparse (_2: *mut FcPattern, _1: *mut c_char, _0: c_int) -> c_int, pub fn XftTextExtents16 (_4: *mut Display, _3: *mut XftFont, _2: *const c_ushort, _1: c_int, _0: *mut XGlyphInfo) -> (), pub fn XftTextExtents32 (_4: *mut Display, _3: *mut XftFont, _2: *const c_uint, _1: c_int, _0: *mut XGlyphInfo) -> (), pub fn XftTextExtents8 (_4: *mut Display, _3: *mut XftFont, _2: *const c_uchar, _1: c_int, _0: *mut XGlyphInfo) -> (), pub fn XftTextExtentsUtf16 (_5: *mut Display, _4: *mut XftFont, _3: *const c_uchar, _2: FcEndian, _1: c_int, _0: *mut XGlyphInfo) -> (), pub fn XftTextExtentsUtf8 (_4: *mut Display, _3: *mut XftFont, _2: *const c_uchar, _1: c_int, _0: *mut XGlyphInfo) -> (), pub fn XftTextRender16 (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_ushort, _0: c_int) -> (), pub fn XftTextRender16BE (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (), pub fn XftTextRender16LE (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (), pub fn XftTextRender32 (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uint, _0: c_int) -> (), pub fn XftTextRender32BE (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (), pub fn XftTextRender32LE (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (), pub fn XftTextRender8 (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (), pub fn XftTextRenderUtf16 (_11: *mut Display, _10: c_int, _9: c_ulong, _8: *mut XftFont, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const c_uchar, _1: FcEndian, _0: c_int) -> (), pub fn XftTextRenderUtf8 (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (), pub fn XftUnlockFace (_0: *mut XftFont) -> (), pub fn XftXlfdParse (_2: *const c_char, _1: c_int, _0: c_int) -> *mut FcPattern, variadic: pub fn XftFontOpen (_1: *mut Display, _0: c_int) -> *mut XftFont, pub fn XftListFonts (_1: *mut Display, _0: c_int) -> *mut XftFontSet, globals: } // // types // pub enum XftFontInfo {} #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XftFont { pub ascent: c_int, pub descent: c_int, pub height: c_int, pub max_advance_width: c_int, pub charset: *mut FcCharSet, pub pattern: *mut FcPattern, } pub enum XftDraw {} #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XftColor { pub pixel: c_ulong, pub color: XRenderColor, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XftCharSpec { pub ucs4: FcChar32, pub x: c_short, pub y: c_short, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XftCharFontSpec { pub font: *mut XftFont, pub ucs4: FcChar32, pub x: c_short, pub y: c_short, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XftFontSet { pub nfont: c_int, pub sfont: c_int, pub fonts: *mut *mut XftPattern, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XftGlyphSpec { pub glyph: FT_UInt, pub x: c_short, pub y: c_short, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XftGlyphFontSpec { pub font: *mut XftFont, pub glyph: FT_UInt, pub x: c_short, pub y: c_short, } pub enum XftPattern {} // // constants // // font attributes pub const XFT_FAMILY: &'static str = "family"; pub const XFT_STYLE: &'static str = "style"; pub const XFT_SLANT: &'static str = "slant"; pub const XFT_WEIGHT: &'static str = "weight"; pub const XFT_SIZE: &'static str = "size"; pub const XFT_PIXEL_SIZE: &'static str = "pixelsize"; pub const XFT_SPACING: &'static str = "spacing"; pub const XFT_FOUNDRY: &'static str = "foundry"; pub const XFT_ANTIALIAS: &'static str = "antialias"; // slant values pub const XFT_SLANT_ROMAN: c_int = 0; pub const XFT_SLANT_ITALIC: c_int = 100; pub const XFT_SLANT_OBLIQUE: c_int = 110; // attribute types pub const XftTypeVoid: c_int = 0; pub const XftTypeInteger: c_int = 1; pub const XftTypeDouble: c_int = 2; pub const XftTypeString: c_int = 3; pub const XftTypeBool: c_int = 4; pub const XftTypeMatrix: c_int = 5; x11-2.18.2/src/xinerama.rs010064400017500001750000000035541361324422500134100ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::{ c_int, c_short, }; use ::xlib::{ Bool, Display, Drawable, Status, Window, XID, }; // // functions // x11_link! { Xlib, xinerama, ["libXinerama.so.1", "libXinerama.so"], 10, pub fn XineramaIsActive (dpy: *mut Display) -> Bool, pub fn XineramaQueryExtension (dpy: *mut Display, event_base: *mut c_int, error_base: *mut c_int) -> Bool, pub fn XineramaQueryScreens (dpy: *mut Display, number: *mut c_int) -> *mut XineramaScreenInfo, pub fn XineramaQueryVersion (dpy: *mut Display, major_versionp: *mut c_int, minor_versionp: *mut c_int) -> Status, pub fn XPanoramiXAllocInfo () -> *mut XPanoramiXInfo, pub fn XPanoramiXGetScreenCount (dpy: *mut Display, drawable: Drawable, panoramiX_info: *mut XPanoramiXInfo) -> Status, pub fn XPanoramiXGetScreenSize (dpy: *mut Display, drawable: Drawable, screen_num: c_int, panoramiX_info: *mut XPanoramiXInfo) -> Status, pub fn XPanoramiXGetState (dpy: *mut Display, drawable: Drawable, panoramiX_info: *mut XPanoramiXInfo) -> Status, pub fn XPanoramiXQueryExtension (dpy: *mut Display, event_base_return: *mut c_int, error_base_return: *mut c_int) -> Bool, pub fn XPanoramiXQueryVersion (dpy: *mut Display, major_version_return: *mut c_int, minor_version_return: *mut c_int) -> Status, variadic: globals: } // // types // #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XineramaScreenInfo { pub screen_number: c_int, pub x_org: c_short, pub y_org: c_short, pub width: c_short, pub height: c_short, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XPanoramiXInfo { pub window: Window, pub screen: c_int, pub State: c_int, pub width: c_int, pub height: c_int, pub ScreenCount: c_int, pub eventMask: XID, } x11-2.18.2/src/xinput.rs010064400017500001750000000153601361324422500131310ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::{ c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, }; use ::xlib::{ Atom, Display, Time, XEvent, XID, XModifierKeymap, }; // // functions // x11_link! { XInput, xi, ["libXi.so.6", "libXi.so"], 44, pub fn XAllowDeviceEvents (_4: *mut Display, _3: *mut XDevice, _2: c_int, _1: c_ulong) -> c_int, pub fn XChangeDeviceControl (_4: *mut Display, _3: *mut XDevice, _2: c_int, _1: *mut XDeviceControl) -> c_int, pub fn XChangeDeviceDontPropagateList (_5: *mut Display, _4: c_ulong, _3: c_int, _2: *mut c_ulong, _1: c_int) -> c_int, pub fn XChangeDeviceKeyMapping (_6: *mut Display, _5: *mut XDevice, _4: c_int, _3: c_int, _2: *mut c_ulong, _1: c_int) -> c_int, pub fn XChangeDeviceProperty (_8: *mut Display, _7: *mut XDevice, _6: c_ulong, _5: c_ulong, _4: c_int, _3: c_int, _2: *const c_uchar, _1: c_int) -> (), pub fn XChangeFeedbackControl (_4: *mut Display, _3: *mut XDevice, _2: c_ulong, _1: *mut XFeedbackControl) -> c_int, pub fn XChangeKeyboardDevice (_2: *mut Display, _1: *mut XDevice) -> c_int, pub fn XChangePointerDevice (_4: *mut Display, _3: *mut XDevice, _2: c_int, _1: c_int) -> c_int, pub fn XCloseDevice (_2: *mut Display, _1: *mut XDevice) -> c_int, pub fn XDeleteDeviceProperty (_3: *mut Display, _2: *mut XDevice, _1: c_ulong) -> (), pub fn XDeviceBell (_5: *mut Display, _4: *mut XDevice, _3: c_ulong, _2: c_ulong, _1: c_int) -> c_int, pub fn XFreeDeviceControl (_1: *mut XDeviceControl) -> (), pub fn XFreeDeviceList (_1: *mut XDeviceInfo) -> (), pub fn XFreeDeviceMotionEvents (_1: *mut XDeviceTimeCoord) -> (), pub fn XFreeDeviceState (_1: *mut XDeviceState) -> (), pub fn XFreeFeedbackList (_1: *mut XFeedbackState) -> (), pub fn XGetDeviceButtonMapping (_4: *mut Display, _3: *mut XDevice, _2: *mut c_uchar, _1: c_uint) -> c_int, pub fn XGetDeviceControl (_3: *mut Display, _2: *mut XDevice, _1: c_int) -> *mut XDeviceControl, pub fn XGetDeviceDontPropagateList (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> *mut c_ulong, pub fn XGetDeviceFocus (_5: *mut Display, _4: *mut XDevice, _3: *mut c_ulong, _2: *mut c_int, _1: *mut c_ulong) -> c_int, pub fn XGetDeviceKeyMapping (_5: *mut Display, _4: *mut XDevice, _3: c_uchar, _2: c_int, _1: *mut c_int) -> *mut c_ulong, pub fn XGetDeviceModifierMapping (_2: *mut Display, _1: *mut XDevice) -> *mut XModifierKeymap, pub fn XGetDeviceMotionEvents (_7: *mut Display, _6: *mut XDevice, _5: c_ulong, _4: c_ulong, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> *mut XDeviceTimeCoord, pub fn XGetDeviceProperty (_12: *mut Display, _11: *mut XDevice, _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, pub fn XGetExtensionVersion (_2: *mut Display, _1: *const c_char) -> *mut XExtensionVersion, pub fn XGetFeedbackControl (_3: *mut Display, _2: *mut XDevice, _1: *mut c_int) -> *mut XFeedbackState, pub fn XGetSelectedExtensionEvents (_6: *mut Display, _5: c_ulong, _4: *mut c_int, _3: *mut *mut c_ulong, _2: *mut c_int, _1: *mut *mut c_ulong) -> c_int, pub fn XGrabDevice (_9: *mut Display, _8: *mut XDevice, _7: c_ulong, _6: c_int, _5: c_int, _4: *mut c_ulong, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XGrabDeviceButton (_11: *mut Display, _10: *mut XDevice, _9: c_uint, _8: c_uint, _7: *mut XDevice, _6: c_ulong, _5: c_int, _4: c_uint, _3: *mut c_ulong, _2: c_int, _1: c_int) -> c_int, pub fn XGrabDeviceKey (_11: *mut Display, _10: *mut XDevice, _9: c_uint, _8: c_uint, _7: *mut XDevice, _6: c_ulong, _5: c_int, _4: c_uint, _3: *mut c_ulong, _2: c_int, _1: c_int) -> c_int, pub fn XListDeviceProperties (_3: *mut Display, _2: *mut XDevice, _1: *mut c_int) -> *mut c_ulong, pub fn XListInputDevices (_2: *mut Display, _1: *mut c_int) -> *mut XDeviceInfo, pub fn XOpenDevice (_2: *mut Display, _1: c_ulong) -> *mut XDevice, pub fn XQueryDeviceState (_2: *mut Display, _1: *mut XDevice) -> *mut XDeviceState, pub fn XSelectExtensionEvent (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: c_int) -> c_int, pub fn XSendExtensionEvent (_7: *mut Display, _6: *mut XDevice, _5: c_ulong, _4: c_int, _3: c_int, _2: *mut c_ulong, _1: *mut XEvent) -> c_int, pub fn XSetDeviceButtonMapping (_4: *mut Display, _3: *mut XDevice, _2: *mut c_uchar, _1: c_int) -> c_int, pub fn XSetDeviceFocus (_5: *mut Display, _4: *mut XDevice, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int, pub fn XSetDeviceMode (_3: *mut Display, _2: *mut XDevice, _1: c_int) -> c_int, pub fn XSetDeviceModifierMapping (_3: *mut Display, _2: *mut XDevice, _1: *mut XModifierKeymap) -> c_int, pub fn XSetDeviceValuators (_5: *mut Display, _4: *mut XDevice, _3: *mut c_int, _2: c_int, _1: c_int) -> c_int, pub fn XUngrabDevice (_3: *mut Display, _2: *mut XDevice, _1: c_ulong) -> c_int, pub fn XUngrabDeviceButton (_6: *mut Display, _5: *mut XDevice, _4: c_uint, _3: c_uint, _2: *mut XDevice, _1: c_ulong) -> c_int, pub fn XUngrabDeviceKey (_6: *mut Display, _5: *mut XDevice, _4: c_uint, _3: c_uint, _2: *mut XDevice, _1: c_ulong) -> c_int, variadic: globals: } // // types // pub enum _XAnyClassinfo {} pub type XAnyClassPtr = *mut _XAnyClassinfo; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XDevice { pub device_id: XID, pub num_classes: c_int, pub classes: *mut XInputClassInfo, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XDeviceControl { pub control: XID, pub length: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XDeviceInfo { pub id: XID, pub type_: Atom, pub name: *mut c_char, pub num_classes: c_int, pub use_: c_int, pub inputclassinfo: XAnyClassPtr, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XDeviceState { pub device_id: XID, pub num_classes: c_int, pub data: *mut XInputClass, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XDeviceTimeCoord { pub time: Time, pub data: *mut c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XExtensionVersion { pub present: c_int, pub major_version: c_short, pub minor_version: c_short, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XFeedbackControl { pub class: XID, pub length: c_int, pub id: XID, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XFeedbackState { pub class: XID, pub length: c_int, pub id: XID, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XInputClass { pub class: c_uchar, pub length: c_uchar, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XInputClassInfo { pub input_class: c_uchar, pub event_type_base: c_uchar, } x11-2.18.2/src/xinput2.rs010064400017500001750000000650151361324422500132150ustar0000000000000000use xfixes::PointerBarrier; use xlib::{Atom, Display, Time, Window}; use std::os::raw::{c_int, c_uint, c_long, c_double, c_ulong, c_uchar}; // // macro translations // fn mask_byte(mask_flag: i32) -> usize { (mask_flag >> 3) as usize } pub fn XISetMask(mask: &mut [::std::os::raw::c_uchar], event: i32) { mask[mask_byte(event)] |= 1 << (event & 7); } pub fn XIClearMask(mask: &mut [::std::os::raw::c_uchar], event: i32) { mask[mask_byte(event)] &= 1 << (event & 7); } pub fn XIMaskIsSet(mask: &[::std::os::raw::c_uchar], event: i32) -> bool { (mask[mask_byte(event)] & (1 << (event & 7))) != 0 } // // functions // x11_link! { XInput2, xi, ["libXi.so.6", "libXi.so"], 34, pub fn XIAllowEvents (_4: *mut Display, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XIAllowTouchEvents (_5: *mut Display, _4: c_int, _3: c_uint, _2: c_ulong, _1: c_int) -> c_int, pub fn XIBarrierReleasePointer (_4: *mut Display, _3: c_int, _2: c_ulong, _1: c_uint) -> (), pub fn XIBarrierReleasePointers (_3: *mut Display, _2: *mut XIBarrierReleasePointerInfo, _1: c_int) -> (), pub fn XIChangeHierarchy (_3: *mut Display, _2: *mut XIAnyHierarchyChangeInfo, _1: c_int) -> c_int, 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) -> (), pub fn XIDefineCursor (_4: *mut Display, _3: c_int, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XIDeleteProperty (_3: *mut Display, _2: c_int, _1: c_ulong) -> (), pub fn XIFreeDeviceInfo (_1: *mut XIDeviceInfo) -> (), pub fn XIGetClientPointer (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> c_int, pub fn XIGetFocus (_3: *mut Display, _2: c_int, _1: *mut c_ulong) -> c_int, 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, pub fn XIGetSelectedEvents (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> *mut XIEventMask, 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, 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, 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, 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, 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, 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, pub fn XIListProperties (_3: *mut Display, _2: c_int, _1: *mut c_int) -> *mut c_ulong, pub fn XIQueryDevice (_3: *mut Display, _2: c_int, _1: *mut c_int) -> *mut XIDeviceInfo, 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, pub fn XIQueryVersion (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XISelectEvents (_4: *mut Display, _3: c_ulong, _2: *mut XIEventMask, _1: c_int) -> c_int, pub fn XISetClientPointer (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int, pub fn XISetFocus (_4: *mut Display, _3: c_int, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XIUndefineCursor (_3: *mut Display, _2: c_int, _1: c_ulong) -> c_int, pub fn XIUngrabButton (_6: *mut Display, _5: c_int, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, pub fn XIUngrabDevice (_3: *mut Display, _2: c_int, _1: c_ulong) -> c_int, pub fn XIUngrabEnter (_5: *mut Display, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, pub fn XIUngrabFocusIn (_5: *mut Display, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, pub fn XIUngrabKeycode (_6: *mut Display, _5: c_int, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, pub fn XIUngrabTouchBegin (_5: *mut Display, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int, 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, variadic: globals: } // // constants // (auto-generated with cmacros) // pub const XInput_2_0: i32 = 7; pub const XI_2_Major: i32 = 2; pub const XI_2_Minor: i32 = 3; pub const XIPropertyDeleted: i32 = 0; pub const XIPropertyCreated: i32 = 1; pub const XIPropertyModified: i32 = 2; pub const XIPropModeReplace: i32 = 0; pub const XIPropModePrepend: i32 = 1; pub const XIPropModeAppend: i32 = 2; pub const XINotifyNormal: i32 = 0; pub const XINotifyGrab: i32 = 1; pub const XINotifyUngrab: i32 = 2; pub const XINotifyWhileGrabbed: i32 = 3; pub const XINotifyPassiveGrab: i32 = 4; pub const XINotifyPassiveUngrab: i32 = 5; pub const XINotifyAncestor: i32 = 0; pub const XINotifyVirtual: i32 = 1; pub const XINotifyInferior: i32 = 2; pub const XINotifyNonlinear: i32 = 3; pub const XINotifyNonlinearVirtual: i32 = 4; pub const XINotifyPointer: i32 = 5; pub const XINotifyPointerRoot: i32 = 6; pub const XINotifyDetailNone: i32 = 7; pub const XIGrabModeSync: i32 = 0; pub const XIGrabModeAsync: i32 = 1; pub const XIGrabModeTouch: i32 = 2; pub const XIGrabSuccess: i32 = 0; pub const XIAlreadyGrabbed: i32 = 1; pub const XIGrabInvalidTime: i32 = 2; pub const XIGrabNotViewable: i32 = 3; pub const XIGrabFrozen: i32 = 4; pub const XIGrabtypeButton: i32 = 0; pub const XIGrabtypeKeycode: i32 = 1; pub const XIGrabtypeEnter: i32 = 2; pub const XIGrabtypeFocusIn: i32 = 3; pub const XIGrabtypeTouchBegin: i32 = 4; pub const XIAnyButton: i32 = 0; pub const XIAnyKeycode: i32 = 0; pub const XIAsyncDevice: i32 = 0; pub const XISyncDevice: i32 = 1; pub const XIReplayDevice: i32 = 2; pub const XIAsyncPairedDevice: i32 = 3; pub const XIAsyncPair: i32 = 4; pub const XISyncPair: i32 = 5; pub const XIAcceptTouch: i32 = 6; pub const XIRejectTouch: i32 = 7; pub const XISlaveSwitch: i32 = 1; pub const XIDeviceChange: i32 = 2; pub const XIMasterAdded: i32 = (1 << 0); pub const XIMasterRemoved: i32 = (1 << 1); pub const XISlaveAdded: i32 = (1 << 2); pub const XISlaveRemoved: i32 = (1 << 3); pub const XISlaveAttached: i32 = (1 << 4); pub const XISlaveDetached: i32 = (1 << 5); pub const XIDeviceEnabled: i32 = (1 << 6); pub const XIDeviceDisabled: i32 = (1 << 7); pub const XIAddMaster: i32 = 1; pub const XIRemoveMaster: i32 = 2; pub const XIAttachSlave: i32 = 3; pub const XIDetachSlave: i32 = 4; pub const XIAttachToMaster: i32 = 1; pub const XIFloating: i32 = 2; pub const XIModeRelative: i32 = 0; pub const XIModeAbsolute: i32 = 1; pub const XIMasterPointer: i32 = 1; pub const XIMasterKeyboard: i32 = 2; pub const XISlavePointer: i32 = 3; pub const XISlaveKeyboard: i32 = 4; pub const XIFloatingSlave: i32 = 5; pub const XIKeyClass: i32 = 0; pub const XIButtonClass: i32 = 1; pub const XIValuatorClass: i32 = 2; pub const XIScrollClass: i32 = 3; pub const XITouchClass: i32 = 8; pub const XIScrollTypeVertical: i32 = 1; pub const XIScrollTypeHorizontal: i32 = 2; pub const XIScrollFlagNoEmulation: i32 = (1 << 0); pub const XIScrollFlagPreferred: i32 = (1 << 1); pub const XIKeyRepeat: i32 = (1 << 16); pub const XIPointerEmulated: i32 = (1 << 16); pub const XITouchPendingEnd: i32 = (1 << 16); pub const XITouchEmulatingPointer: i32 = (1 << 17); pub const XIBarrierPointerReleased: i32 = (1 << 0); pub const XIBarrierDeviceIsGrabbed: i32 = (1 << 1); pub const XIDirectTouch: i32 = 1; pub const XIDependentTouch: i32 = 2; pub const XIAllDevices: i32 = 0; pub const XIAllMasterDevices: i32 = 1; pub const XI_DeviceChanged: i32 = 1; pub const XI_KeyPress: i32 = 2; pub const XI_KeyRelease: i32 = 3; pub const XI_ButtonPress: i32 = 4; pub const XI_ButtonRelease: i32 = 5; pub const XI_Motion: i32 = 6; pub const XI_Enter: i32 = 7; pub const XI_Leave: i32 = 8; pub const XI_FocusIn: i32 = 9; pub const XI_FocusOut: i32 = 10; pub const XI_HierarchyChanged: i32 = 11; pub const XI_PropertyEvent: i32 = 12; pub const XI_RawKeyPress: i32 = 13; pub const XI_RawKeyRelease: i32 = 14; pub const XI_RawButtonPress: i32 = 15; pub const XI_RawButtonRelease: i32 = 16; pub const XI_RawMotion: i32 = 17; pub const XI_TouchBegin: i32 = 18 /* XI 2.2 */; pub const XI_TouchUpdate: i32 = 19; pub const XI_TouchEnd: i32 = 20; pub const XI_TouchOwnership: i32 = 21; pub const XI_RawTouchBegin: i32 = 22; pub const XI_RawTouchUpdate: i32 = 23; pub const XI_RawTouchEnd: i32 = 24; pub const XI_BarrierHit: i32 = 25 /* XI 2.3 */; pub const XI_BarrierLeave: i32 = 26; pub const XI_LASTEVENT: i32 = XI_BarrierLeave; pub const XI_DeviceChangedMask: i32 = (1 << XI_DeviceChanged); pub const XI_KeyPressMask: i32 = (1 << XI_KeyPress); pub const XI_KeyReleaseMask: i32 = (1 << XI_KeyRelease); pub const XI_ButtonPressMask: i32 = (1 << XI_ButtonPress); pub const XI_ButtonReleaseMask: i32 = (1 << XI_ButtonRelease); pub const XI_MotionMask: i32 = (1 << XI_Motion); pub const XI_EnterMask: i32 = (1 << XI_Enter); pub const XI_LeaveMask: i32 = (1 << XI_Leave); pub const XI_FocusInMask: i32 = (1 << XI_FocusIn); pub const XI_FocusOutMask: i32 = (1 << XI_FocusOut); pub const XI_HierarchyChangedMask: i32 = (1 << XI_HierarchyChanged); pub const XI_PropertyEventMask: i32 = (1 << XI_PropertyEvent); pub const XI_RawKeyPressMask: i32 = (1 << XI_RawKeyPress); pub const XI_RawKeyReleaseMask: i32 = (1 << XI_RawKeyRelease); pub const XI_RawButtonPressMask: i32 = (1 << XI_RawButtonPress); pub const XI_RawButtonReleaseMask: i32 = (1 << XI_RawButtonRelease); pub const XI_RawMotionMask: i32 = (1 << XI_RawMotion); pub const XI_TouchBeginMask: i32 = (1 << XI_TouchBegin); pub const XI_TouchEndMask: i32 = (1 << XI_TouchEnd); pub const XI_TouchOwnershipChangedMask: i32 = (1 << XI_TouchOwnership); pub const XI_TouchUpdateMask: i32 = (1 << XI_TouchUpdate); pub const XI_RawTouchBeginMask: i32 = (1 << XI_RawTouchBegin); pub const XI_RawTouchEndMask: i32 = (1 << XI_RawTouchEnd); pub const XI_RawTouchUpdateMask: i32 = (1 << XI_RawTouchUpdate); pub const XI_BarrierHitMask: i32 = (1 << XI_BarrierHit); pub const XI_BarrierLeaveMask: i32 = (1 << XI_BarrierLeave); // // structs // (auto-generated with rust-bindgen) // #[repr(C)] #[derive(Debug, Copy)] pub struct XIAddMasterInfo { pub _type: ::std::os::raw::c_int, pub name: *mut ::std::os::raw::c_char, pub send_core: ::std::os::raw::c_int, pub enable: ::std::os::raw::c_int, } impl ::std::clone::Clone for XIAddMasterInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIAddMasterInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIRemoveMasterInfo { pub _type: ::std::os::raw::c_int, pub deviceid: ::std::os::raw::c_int, pub return_mode: ::std::os::raw::c_int, pub return_pointer: ::std::os::raw::c_int, pub return_keyboard: ::std::os::raw::c_int, } impl ::std::clone::Clone for XIRemoveMasterInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIRemoveMasterInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIAttachSlaveInfo { pub _type: ::std::os::raw::c_int, pub deviceid: ::std::os::raw::c_int, pub new_master: ::std::os::raw::c_int, } impl ::std::clone::Clone for XIAttachSlaveInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIAttachSlaveInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIDetachSlaveInfo { pub _type: ::std::os::raw::c_int, pub deviceid: ::std::os::raw::c_int, } impl ::std::clone::Clone for XIDetachSlaveInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIDetachSlaveInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIAnyHierarchyChangeInfo { pub _bindgen_data_: [u64; 3usize], } impl XIAnyHierarchyChangeInfo { pub unsafe fn _type(&mut self) -> *mut ::std::os::raw::c_int { let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); ::std::mem::transmute(raw.offset(0)) } pub unsafe fn add(&mut self) -> *mut XIAddMasterInfo { let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); ::std::mem::transmute(raw.offset(0)) } pub unsafe fn remove(&mut self) -> *mut XIRemoveMasterInfo { let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); ::std::mem::transmute(raw.offset(0)) } pub unsafe fn attach(&mut self) -> *mut XIAttachSlaveInfo { let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); ::std::mem::transmute(raw.offset(0)) } pub unsafe fn detach(&mut self) -> *mut XIDetachSlaveInfo { let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); ::std::mem::transmute(raw.offset(0)) } } impl ::std::clone::Clone for XIAnyHierarchyChangeInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIAnyHierarchyChangeInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIModifierState { pub base: ::std::os::raw::c_int, pub latched: ::std::os::raw::c_int, pub locked: ::std::os::raw::c_int, pub effective: ::std::os::raw::c_int, } impl ::std::clone::Clone for XIModifierState { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIModifierState { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } pub type XIGroupState = XIModifierState; #[repr(C)] #[derive(Debug, Copy)] pub struct XIButtonState { pub mask_len: ::std::os::raw::c_int, pub mask: *mut ::std::os::raw::c_uchar, } impl ::std::clone::Clone for XIButtonState { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIButtonState { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIValuatorState { pub mask_len: ::std::os::raw::c_int, pub mask: *mut ::std::os::raw::c_uchar, pub values: *mut ::std::os::raw::c_double, } impl ::std::clone::Clone for XIValuatorState { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIValuatorState { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIEventMask { pub deviceid: ::std::os::raw::c_int, pub mask_len: ::std::os::raw::c_int, pub mask: *mut ::std::os::raw::c_uchar, } impl ::std::clone::Clone for XIEventMask { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIEventMask { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIAnyClassInfo { pub _type: ::std::os::raw::c_int, pub sourceid: ::std::os::raw::c_int, } impl ::std::clone::Clone for XIAnyClassInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIAnyClassInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIButtonClassInfo { pub _type: ::std::os::raw::c_int, pub sourceid: ::std::os::raw::c_int, pub num_buttons: ::std::os::raw::c_int, pub labels: *mut Atom, pub state: XIButtonState, } impl ::std::clone::Clone for XIButtonClassInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIButtonClassInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIKeyClassInfo { pub _type: ::std::os::raw::c_int, pub sourceid: ::std::os::raw::c_int, pub num_keycodes: ::std::os::raw::c_int, pub keycodes: *mut ::std::os::raw::c_int, } impl ::std::clone::Clone for XIKeyClassInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIKeyClassInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIValuatorClassInfo { pub _type: ::std::os::raw::c_int, pub sourceid: ::std::os::raw::c_int, pub number: ::std::os::raw::c_int, pub label: Atom, pub min: ::std::os::raw::c_double, pub max: ::std::os::raw::c_double, pub value: ::std::os::raw::c_double, pub resolution: ::std::os::raw::c_int, pub mode: ::std::os::raw::c_int, } impl ::std::clone::Clone for XIValuatorClassInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIValuatorClassInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIScrollClassInfo { pub _type: ::std::os::raw::c_int, pub sourceid: ::std::os::raw::c_int, pub number: ::std::os::raw::c_int, pub scroll_type: ::std::os::raw::c_int, pub increment: ::std::os::raw::c_double, pub flags: ::std::os::raw::c_int, } impl ::std::clone::Clone for XIScrollClassInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIScrollClassInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XITouchClassInfo { pub _type: ::std::os::raw::c_int, pub sourceid: ::std::os::raw::c_int, pub mode: ::std::os::raw::c_int, pub num_touches: ::std::os::raw::c_int, } impl ::std::clone::Clone for XITouchClassInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XITouchClassInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIDeviceInfo { pub deviceid: ::std::os::raw::c_int, pub name: *mut ::std::os::raw::c_char, pub _use: ::std::os::raw::c_int, pub attachment: ::std::os::raw::c_int, pub enabled: ::std::os::raw::c_int, pub num_classes: ::std::os::raw::c_int, pub classes: *mut *mut XIAnyClassInfo, } impl ::std::clone::Clone for XIDeviceInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIDeviceInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIGrabModifiers { pub modifiers: ::std::os::raw::c_int, pub status: ::std::os::raw::c_int, } impl ::std::clone::Clone for XIGrabModifiers { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIGrabModifiers { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } pub type BarrierEventID = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy)] pub struct XIBarrierReleasePointerInfo { pub deviceid: ::std::os::raw::c_int, pub barrier: PointerBarrier, pub eventid: BarrierEventID, } impl ::std::clone::Clone for XIBarrierReleasePointerInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIBarrierReleasePointerInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIEvent { pub _type: ::std::os::raw::c_int, pub serial: ::std::os::raw::c_ulong, pub send_event: ::std::os::raw::c_int, pub display: *mut Display, pub extension: ::std::os::raw::c_int, pub evtype: ::std::os::raw::c_int, pub time: Time, } impl ::std::clone::Clone for XIEvent { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIEvent { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIHierarchyInfo { pub deviceid: ::std::os::raw::c_int, pub attachment: ::std::os::raw::c_int, pub _use: ::std::os::raw::c_int, pub enabled: ::std::os::raw::c_int, pub flags: ::std::os::raw::c_int, } impl ::std::clone::Clone for XIHierarchyInfo { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIHierarchyInfo { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIHierarchyEvent { pub _type: ::std::os::raw::c_int, pub serial: ::std::os::raw::c_ulong, pub send_event: ::std::os::raw::c_int, pub display: *mut Display, pub extension: ::std::os::raw::c_int, pub evtype: ::std::os::raw::c_int, pub time: Time, pub flags: ::std::os::raw::c_int, pub num_info: ::std::os::raw::c_int, pub info: *mut XIHierarchyInfo, } impl ::std::clone::Clone for XIHierarchyEvent { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIHierarchyEvent { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIDeviceChangedEvent { pub _type: ::std::os::raw::c_int, pub serial: ::std::os::raw::c_ulong, pub send_event: ::std::os::raw::c_int, pub display: *mut Display, pub extension: ::std::os::raw::c_int, pub evtype: ::std::os::raw::c_int, pub time: Time, pub deviceid: ::std::os::raw::c_int, pub sourceid: ::std::os::raw::c_int, pub reason: ::std::os::raw::c_int, pub num_classes: ::std::os::raw::c_int, pub classes: *mut *mut XIAnyClassInfo, } impl ::std::clone::Clone for XIDeviceChangedEvent { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIDeviceChangedEvent { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIDeviceEvent { pub _type: ::std::os::raw::c_int, pub serial: ::std::os::raw::c_ulong, pub send_event: ::std::os::raw::c_int, pub display: *mut Display, pub extension: ::std::os::raw::c_int, pub evtype: ::std::os::raw::c_int, pub time: Time, pub deviceid: ::std::os::raw::c_int, pub sourceid: ::std::os::raw::c_int, pub detail: ::std::os::raw::c_int, pub root: Window, pub event: Window, pub child: Window, pub root_x: ::std::os::raw::c_double, pub root_y: ::std::os::raw::c_double, pub event_x: ::std::os::raw::c_double, pub event_y: ::std::os::raw::c_double, pub flags: ::std::os::raw::c_int, pub buttons: XIButtonState, pub valuators: XIValuatorState, pub mods: XIModifierState, pub group: XIGroupState, } impl ::std::clone::Clone for XIDeviceEvent { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIDeviceEvent { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIRawEvent { pub _type: ::std::os::raw::c_int, pub serial: ::std::os::raw::c_ulong, pub send_event: ::std::os::raw::c_int, pub display: *mut Display, pub extension: ::std::os::raw::c_int, pub evtype: ::std::os::raw::c_int, pub time: Time, pub deviceid: ::std::os::raw::c_int, pub sourceid: ::std::os::raw::c_int, pub detail: ::std::os::raw::c_int, pub flags: ::std::os::raw::c_int, pub valuators: XIValuatorState, pub raw_values: *mut ::std::os::raw::c_double, } impl ::std::clone::Clone for XIRawEvent { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIRawEvent { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIEnterEvent { pub _type: ::std::os::raw::c_int, pub serial: ::std::os::raw::c_ulong, pub send_event: ::std::os::raw::c_int, pub display: *mut Display, pub extension: ::std::os::raw::c_int, pub evtype: ::std::os::raw::c_int, pub time: Time, pub deviceid: ::std::os::raw::c_int, pub sourceid: ::std::os::raw::c_int, pub detail: ::std::os::raw::c_int, pub root: Window, pub event: Window, pub child: Window, pub root_x: ::std::os::raw::c_double, pub root_y: ::std::os::raw::c_double, pub event_x: ::std::os::raw::c_double, pub event_y: ::std::os::raw::c_double, pub mode: ::std::os::raw::c_int, pub focus: ::std::os::raw::c_int, pub same_screen: ::std::os::raw::c_int, pub buttons: XIButtonState, pub mods: XIModifierState, pub group: XIGroupState, } impl ::std::clone::Clone for XIEnterEvent { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIEnterEvent { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } pub type XILeaveEvent = XIEnterEvent; pub type XIFocusInEvent = XIEnterEvent; pub type XIFocusOutEvent = XIEnterEvent; #[repr(C)] #[derive(Debug, Copy)] pub struct XIPropertyEvent { pub _type: ::std::os::raw::c_int, pub serial: ::std::os::raw::c_ulong, pub send_event: ::std::os::raw::c_int, pub display: *mut Display, pub extension: ::std::os::raw::c_int, pub evtype: ::std::os::raw::c_int, pub time: Time, pub deviceid: ::std::os::raw::c_int, pub property: Atom, pub what: ::std::os::raw::c_int, } impl ::std::clone::Clone for XIPropertyEvent { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIPropertyEvent { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XITouchOwnershipEvent { pub _type: ::std::os::raw::c_int, pub serial: ::std::os::raw::c_ulong, pub send_event: ::std::os::raw::c_int, pub display: *mut Display, pub extension: ::std::os::raw::c_int, pub evtype: ::std::os::raw::c_int, pub time: Time, pub deviceid: ::std::os::raw::c_int, pub sourceid: ::std::os::raw::c_int, pub touchid: ::std::os::raw::c_uint, pub root: Window, pub event: Window, pub child: Window, pub flags: ::std::os::raw::c_int, } impl ::std::clone::Clone for XITouchOwnershipEvent { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XITouchOwnershipEvent { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } #[repr(C)] #[derive(Debug, Copy)] pub struct XIBarrierEvent { pub _type: ::std::os::raw::c_int, pub serial: ::std::os::raw::c_ulong, pub send_event: ::std::os::raw::c_int, pub display: *mut Display, pub extension: ::std::os::raw::c_int, pub evtype: ::std::os::raw::c_int, pub time: Time, pub deviceid: ::std::os::raw::c_int, pub sourceid: ::std::os::raw::c_int, pub event: Window, pub root: Window, pub root_x: ::std::os::raw::c_double, pub root_y: ::std::os::raw::c_double, pub dx: ::std::os::raw::c_double, pub dy: ::std::os::raw::c_double, pub dtime: ::std::os::raw::c_int, pub flags: ::std::os::raw::c_int, pub barrier: PointerBarrier, pub eventid: BarrierEventID, } impl ::std::clone::Clone for XIBarrierEvent { fn clone(&self) -> Self { *self } } impl ::std::default::Default for XIBarrierEvent { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } x11-2.18.2/src/xlib.rs010064400017500001750000004341361361324530100125420ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::slice; use std::os::raw::{ c_char, c_double, c_int, c_long, c_short, c_schar, c_uchar, c_uint, c_ulong, c_ushort, c_void, }; use std::fmt; use libc::wchar_t; use ::internal::{ mem_eq, transmute_union, }; use xf86vmode; use xrandr; use xss; // deprecated pub mod xkb {} // // functions // x11_link! { Xlib, x11, ["libX11.so.6", "libX11.so"], 767, pub fn XActivateScreenSaver (_1: *mut Display) -> c_int, pub fn XAddConnectionWatch (_3: *mut Display, _2: Option, _1: *mut c_char) -> c_int, pub fn XAddExtension (_1: *mut Display) -> *mut XExtCodes, pub fn XAddHost (_2: *mut Display, _1: *mut XHostAddress) -> c_int, pub fn XAddHosts (_3: *mut Display, _2: *mut XHostAddress, _1: c_int) -> c_int, pub fn XAddPixel (_2: *mut XImage, _1: c_long) -> c_int, pub fn XAddToExtensionList (_2: *mut *mut XExtData, _1: *mut XExtData) -> c_int, pub fn XAddToSaveSet (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XAllocClassHint () -> *mut XClassHint, pub fn XAllocColor (_3: *mut Display, _2: c_ulong, _1: *mut XColor) -> c_int, pub fn XAllocColorCells (_7: *mut Display, _6: c_ulong, _5: c_int, _4: *mut c_ulong, _3: c_uint, _2: *mut c_ulong, _1: c_uint) -> c_int, pub fn XAllocColorPlanes (_11: *mut Display, _10: c_ulong, _9: c_int, _8: *mut c_ulong, _7: c_int, _6: c_int, _5: c_int, _4: c_int, _3: *mut c_ulong, _2: *mut c_ulong, _1: *mut c_ulong) -> c_int, pub fn XAllocIconSize () -> *mut XIconSize, pub fn XAllocNamedColor (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: *mut XColor, _1: *mut XColor) -> c_int, pub fn XAllocSizeHints () -> *mut XSizeHints, pub fn XAllocStandardColormap () -> *mut XStandardColormap, pub fn XAllocWMHints () -> *mut XWMHints, pub fn XAllowEvents (_3: *mut Display, _2: c_int, _1: c_ulong) -> c_int, pub fn XAllPlanes () -> c_ulong, pub fn XAutoRepeatOff (_1: *mut Display) -> c_int, pub fn XAutoRepeatOn (_1: *mut Display) -> c_int, pub fn XBaseFontNameListOfFontSet (_1: XFontSet) -> *mut c_char, pub fn XBell (_2: *mut Display, _1: c_int) -> c_int, pub fn XBitmapBitOrder (_1: *mut Display) -> c_int, pub fn XBitmapPad (_1: *mut Display) -> c_int, pub fn XBitmapUnit (_1: *mut Display) -> c_int, pub fn XBlackPixel (_2: *mut Display, _1: c_int) -> c_ulong, pub fn XBlackPixelOfScreen (_1: *mut Screen) -> c_ulong, pub fn XCellsOfScreen (_1: *mut Screen) -> c_int, pub fn XChangeActivePointerGrab (_4: *mut Display, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XChangeGC (_4: *mut Display, _3: GC, _2: c_ulong, _1: *mut XGCValues) -> c_int, pub fn XChangeKeyboardControl (_3: *mut Display, _2: c_ulong, _1: *mut XKeyboardControl) -> c_int, pub fn XChangeKeyboardMapping (_5: *mut Display, _4: c_int, _3: c_int, _2: *mut c_ulong, _1: c_int) -> c_int, pub fn XChangePointerControl (_6: *mut Display, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int, pub fn XChangeProperty (_8: *mut Display, _7: c_ulong, _6: c_ulong, _5: c_ulong, _4: c_int, _3: c_int, _2: *const c_uchar, _1: c_int) -> c_int, pub fn XChangeSaveSet (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int, pub fn XChangeWindowAttributes (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: *mut XSetWindowAttributes) -> c_int, pub fn XCheckIfEvent (_4: *mut Display, _3: *mut XEvent, _2: Option c_int>, _1: *mut c_char) -> c_int, pub fn XCheckMaskEvent (_3: *mut Display, _2: c_long, _1: *mut XEvent) -> c_int, pub fn XCheckTypedEvent (_3: *mut Display, _2: c_int, _1: *mut XEvent) -> c_int, pub fn XCheckTypedWindowEvent (_4: *mut Display, _3: c_ulong, _2: c_int, _1: *mut XEvent) -> c_int, pub fn XCheckWindowEvent (_4: *mut Display, _3: c_ulong, _2: c_long, _1: *mut XEvent) -> c_int, pub fn XCirculateSubwindows (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int, pub fn XCirculateSubwindowsDown (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XCirculateSubwindowsUp (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XClearArea (_7: *mut Display, _6: c_ulong, _5: c_int, _4: c_int, _3: c_uint, _2: c_uint, _1: c_int) -> c_int, pub fn XClearWindow (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XClipBox (_2: Region, _1: *mut XRectangle) -> c_int, pub fn XCloseDisplay (_1: *mut Display) -> c_int, pub fn XCloseIM (_1: XIM) -> c_int, pub fn XCloseOM (_1: XOM) -> c_int, pub fn XcmsAddColorSpace (_1: *mut XcmsColorSpace) -> c_int, pub fn XcmsAddFunctionSet (_1: *mut XcmsFunctionSet) -> c_int, pub fn XcmsAllocColor (_4: *mut Display, _3: c_ulong, _2: *mut XcmsColor, _1: c_ulong) -> c_int, pub fn XcmsAllocNamedColor (_6: *mut Display, _5: c_ulong, _4: *const c_char, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_ulong) -> c_int, pub fn XcmsCCCOfColormap (_2: *mut Display, _1: c_ulong) -> XcmsCCC, pub fn XcmsCIELabClipab (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsCIELabClipL (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsCIELabClipLab (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsCIELabQueryMaxC (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, pub fn XcmsCIELabQueryMaxL (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, pub fn XcmsCIELabQueryMaxLC (_3: XcmsCCC, _2: c_double, _1: *mut XcmsColor) -> c_int, pub fn XcmsCIELabQueryMinL (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, pub fn XcmsCIELabToCIEXYZ (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, pub fn XcmsCIELabWhiteShiftColors (_7: XcmsCCC, _6: *mut XcmsColor, _5: *mut XcmsColor, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsCIELuvClipL (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsCIELuvClipLuv (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsCIELuvClipuv (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsCIELuvQueryMaxC (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, pub fn XcmsCIELuvQueryMaxL (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, pub fn XcmsCIELuvQueryMaxLC (_3: XcmsCCC, _2: c_double, _1: *mut XcmsColor) -> c_int, pub fn XcmsCIELuvQueryMinL (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, pub fn XcmsCIELuvToCIEuvY (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, pub fn XcmsCIELuvWhiteShiftColors (_7: XcmsCCC, _6: *mut XcmsColor, _5: *mut XcmsColor, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsCIEuvYToCIELuv (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, pub fn XcmsCIEuvYToCIEXYZ (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, pub fn XcmsCIEuvYToTekHVC (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, pub fn XcmsCIExyYToCIEXYZ (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, pub fn XcmsCIEXYZToCIELab (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, pub fn XcmsCIEXYZToCIEuvY (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, pub fn XcmsCIEXYZToCIExyY (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, pub fn XcmsCIEXYZToRGBi (_4: XcmsCCC, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsClientWhitePointOfCCC (_1: XcmsCCC) -> *mut XcmsColor, pub fn XcmsConvertColors (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_ulong, _1: *mut c_int) -> c_int, pub fn XcmsCreateCCC (_8: *mut Display, _7: c_int, _6: *mut Visual, _5: *mut XcmsColor, _4: Option c_int>, _3: *mut c_char, _2: Option c_int>, _1: *mut c_char) -> XcmsCCC, pub fn XcmsDefaultCCC (_2: *mut Display, _1: c_int) -> XcmsCCC, pub fn XcmsDisplayOfCCC (_1: XcmsCCC) -> *mut Display, pub fn XcmsFormatOfPrefix (_1: *mut c_char) -> c_ulong, pub fn XcmsFreeCCC (_1: XcmsCCC) -> (), pub fn XcmsLookupColor (_6: *mut Display, _5: c_ulong, _4: *const c_char, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_ulong) -> c_int, pub fn XcmsPrefixOfFormat (_1: c_ulong) -> *mut c_char, pub fn XcmsQueryBlack (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int, pub fn XcmsQueryBlue (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int, pub fn XcmsQueryColor (_4: *mut Display, _3: c_ulong, _2: *mut XcmsColor, _1: c_ulong) -> c_int, pub fn XcmsQueryColors (_5: *mut Display, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: c_ulong) -> c_int, pub fn XcmsQueryGreen (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int, pub fn XcmsQueryRed (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int, pub fn XcmsQueryWhite (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int, pub fn XcmsRGBiToCIEXYZ (_4: XcmsCCC, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsRGBiToRGB (_4: XcmsCCC, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsRGBToRGBi (_4: XcmsCCC, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsScreenNumberOfCCC (_1: XcmsCCC) -> c_int, pub fn XcmsScreenWhitePointOfCCC (_1: XcmsCCC) -> *mut XcmsColor, pub fn XcmsSetCCCOfColormap (_3: *mut Display, _2: c_ulong, _1: XcmsCCC) -> XcmsCCC, pub fn XcmsSetCompressionProc (_3: XcmsCCC, _2: Option c_int>, _1: *mut c_char) -> Option c_int>, pub fn XcmsSetWhiteAdjustProc (_3: XcmsCCC, _2: Option c_int>, _1: *mut c_char) -> Option c_int>, pub fn XcmsSetWhitePoint (_2: XcmsCCC, _1: *mut XcmsColor) -> c_int, pub fn XcmsStoreColor (_3: *mut Display, _2: c_ulong, _1: *mut XcmsColor) -> c_int, pub fn XcmsStoreColors (_5: *mut Display, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsTekHVCClipC (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsTekHVCClipV (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsTekHVCClipVC (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsTekHVCQueryMaxC (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, pub fn XcmsTekHVCQueryMaxV (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, pub fn XcmsTekHVCQueryMaxVC (_3: XcmsCCC, _2: c_double, _1: *mut XcmsColor) -> c_int, pub fn XcmsTekHVCQueryMaxVSamples (_4: XcmsCCC, _3: c_double, _2: *mut XcmsColor, _1: c_uint) -> c_int, pub fn XcmsTekHVCQueryMinV (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int, pub fn XcmsTekHVCToCIEuvY (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int, pub fn XcmsTekHVCWhiteShiftColors (_7: XcmsCCC, _6: *mut XcmsColor, _5: *mut XcmsColor, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int, pub fn XcmsVisualOfCCC (_1: XcmsCCC) -> *mut Visual, pub fn XConfigureWindow (_4: *mut Display, _3: c_ulong, _2: c_uint, _1: *mut XWindowChanges) -> c_int, pub fn XConnectionNumber (_1: *mut Display) -> c_int, pub fn XContextDependentDrawing (_1: XFontSet) -> c_int, pub fn XContextualDrawing (_1: XFontSet) -> c_int, pub fn XConvertCase (_3: c_ulong, _2: *mut c_ulong, _1: *mut c_ulong) -> (), pub fn XConvertSelection (_6: *mut Display, _5: c_ulong, _4: c_ulong, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XCopyArea (_10: *mut Display, _9: c_ulong, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int, pub fn XCopyColormapAndFree (_2: *mut Display, _1: c_ulong) -> c_ulong, pub fn XCopyGC (_4: *mut Display, _3: GC, _2: c_ulong, _1: GC) -> c_int, pub fn XCopyPlane (_11: *mut Display, _10: c_ulong, _9: c_ulong, _8: GC, _7: c_int, _6: c_int, _5: c_uint, _4: c_uint, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XCreateBitmapFromData (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: c_uint, _1: c_uint) -> c_ulong, pub fn XCreateColormap (_4: *mut Display, _3: c_ulong, _2: *mut Visual, _1: c_int) -> c_ulong, pub fn XCreateFontCursor (_2: *mut Display, _1: c_uint) -> c_ulong, pub fn XCreateFontSet (_5: *mut Display, _4: *const c_char, _3: *mut *mut *mut c_char, _2: *mut c_int, _1: *mut *mut c_char) -> XFontSet, pub fn XCreateGC (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: *mut XGCValues) -> GC, pub fn XCreateGlyphCursor (_7: *mut Display, _6: c_ulong, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *const XColor, _1: *const XColor) -> c_ulong, pub fn XCreateImage (_10: *mut Display, _9: *mut Visual, _8: c_uint, _7: c_int, _6: c_int, _5: *mut c_char, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> *mut XImage, pub fn XCreatePixmap (_5: *mut Display, _4: c_ulong, _3: c_uint, _2: c_uint, _1: c_uint) -> c_ulong, pub fn XCreatePixmapCursor (_7: *mut Display, _6: c_ulong, _5: c_ulong, _4: *mut XColor, _3: *mut XColor, _2: c_uint, _1: c_uint) -> c_ulong, pub fn XCreatePixmapFromBitmapData (_8: *mut Display, _7: c_ulong, _6: *mut c_char, _5: c_uint, _4: c_uint, _3: c_ulong, _2: c_ulong, _1: c_uint) -> c_ulong, pub fn XCreateRegion () -> Region, pub fn XCreateSimpleWindow (_9: *mut Display, _8: c_ulong, _7: c_int, _6: c_int, _5: c_uint, _4: c_uint, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_ulong, pub fn XCreateWindow (_12: *mut Display, _11: c_ulong, _10: c_int, _9: c_int, _8: c_uint, _7: c_uint, _6: c_uint, _5: c_int, _4: c_uint, _3: *mut Visual, _2: c_ulong, _1: *mut XSetWindowAttributes) -> c_ulong, pub fn XDefaultColormap (_2: *mut Display, _1: c_int) -> c_ulong, pub fn XDefaultColormapOfScreen (_1: *mut Screen) -> c_ulong, pub fn XDefaultDepth (_2: *mut Display, _1: c_int) -> c_int, pub fn XDefaultDepthOfScreen (_1: *mut Screen) -> c_int, pub fn XDefaultGC (_2: *mut Display, _1: c_int) -> GC, pub fn XDefaultGCOfScreen (_1: *mut Screen) -> GC, pub fn XDefaultRootWindow (_1: *mut Display) -> c_ulong, pub fn XDefaultScreen (_1: *mut Display) -> c_int, pub fn XDefaultScreenOfDisplay (_1: *mut Display) -> *mut Screen, pub fn XDefaultString () -> *const c_char, pub fn XDefaultVisual (_2: *mut Display, _1: c_int) -> *mut Visual, pub fn XDefaultVisualOfScreen (_1: *mut Screen) -> *mut Visual, pub fn XDefineCursor (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XDeleteContext (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int, pub fn XDeleteModifiermapEntry (_3: *mut XModifierKeymap, _2: c_uchar, _1: c_int) -> *mut XModifierKeymap, pub fn XDeleteProperty (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XDestroyIC (_1: XIC) -> (), pub fn XDestroyImage (_1: *mut XImage) -> c_int, pub fn XDestroyOC (_1: XFontSet) -> (), pub fn XDestroyRegion (_1: Region) -> c_int, pub fn XDestroySubwindows (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XDestroyWindow (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XDirectionalDependentDrawing (_1: XFontSet) -> c_int, pub fn XDisableAccessControl (_1: *mut Display) -> c_int, pub fn XDisplayCells (_2: *mut Display, _1: c_int) -> c_int, pub fn XDisplayHeight (_2: *mut Display, _1: c_int) -> c_int, pub fn XDisplayHeightMM (_2: *mut Display, _1: c_int) -> c_int, pub fn XDisplayKeycodes (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XDisplayMotionBufferSize (_1: *mut Display) -> c_ulong, pub fn XDisplayName (_1: *const c_char) -> *mut c_char, pub fn XDisplayOfIM (_1: XIM) -> *mut Display, pub fn XDisplayOfOM (_1: XOM) -> *mut Display, pub fn XDisplayOfScreen (_1: *mut Screen) -> *mut Display, pub fn XDisplayPlanes (_2: *mut Display, _1: c_int) -> c_int, pub fn XDisplayString (_1: *mut Display) -> *mut c_char, pub fn XDisplayWidth (_2: *mut Display, _1: c_int) -> c_int, pub fn XDisplayWidthMM (_2: *mut Display, _1: c_int) -> c_int, pub fn XDoesBackingStore (_1: *mut Screen) -> c_int, pub fn XDoesSaveUnders (_1: *mut Screen) -> c_int, pub fn XDrawArc (_9: *mut Display, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int, pub fn XDrawArcs (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XArc, _1: c_int) -> c_int, pub fn XDrawImageString (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> c_int, pub fn XDrawImageString16 (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *const XChar2b, _1: c_int) -> c_int, pub fn XDrawLine (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int, pub fn XDrawLines (_6: *mut Display, _5: c_ulong, _4: GC, _3: *mut XPoint, _2: c_int, _1: c_int) -> c_int, pub fn XDrawPoint (_5: *mut Display, _4: c_ulong, _3: GC, _2: c_int, _1: c_int) -> c_int, pub fn XDrawPoints (_6: *mut Display, _5: c_ulong, _4: GC, _3: *mut XPoint, _2: c_int, _1: c_int) -> c_int, pub fn XDrawRectangle (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int, pub fn XDrawRectangles (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XRectangle, _1: c_int) -> c_int, pub fn XDrawSegments (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XSegment, _1: c_int) -> c_int, pub fn XDrawString (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> c_int, pub fn XDrawString16 (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *const XChar2b, _1: c_int) -> c_int, pub fn XDrawText (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XTextItem, _1: c_int) -> c_int, pub fn XDrawText16 (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XTextItem16, _1: c_int) -> c_int, pub fn XEHeadOfExtensionList (_1: XEDataObject) -> *mut *mut XExtData, pub fn XEmptyRegion (_1: Region) -> c_int, pub fn XEnableAccessControl (_1: *mut Display) -> c_int, pub fn XEqualRegion (_2: Region, _1: Region) -> c_int, pub fn XESetBeforeFlush (_3: *mut Display, _2: c_int, _1: Option) -> Option, pub fn XESetCloseDisplay (_3: *mut Display, _2: c_int, _1: Option c_int>) -> Option c_int>, pub fn XESetCopyEventCookie (_3: *mut Display, _2: c_int, _1: Option c_int>) -> Option c_int>, pub fn XESetCopyGC (_3: *mut Display, _2: c_int, _1: Option c_int>) -> Option c_int>, pub fn XESetCreateFont (_3: *mut Display, _2: c_int, _1: Option c_int>) -> Option c_int>, pub fn XESetCreateGC (_3: *mut Display, _2: c_int, _1: Option c_int>) -> Option c_int>, pub fn XESetError (_3: *mut Display, _2: c_int, _1: Option c_int>) -> Option c_int>, pub fn XESetErrorString (_3: *mut Display, _2: c_int, _1: Option *mut c_char>) -> Option *mut c_char>, pub fn XESetEventToWire (_3: *mut Display, _2: c_int, _1: Option c_int>) -> Option c_int>, pub fn XESetFlushGC (_3: *mut Display, _2: c_int, _1: Option c_int>) -> Option c_int>, pub fn XESetFreeFont (_3: *mut Display, _2: c_int, _1: Option c_int>) -> Option c_int>, pub fn XESetFreeGC (_3: *mut Display, _2: c_int, _1: Option c_int>) -> Option c_int>, pub fn XESetPrintErrorValues (_3: *mut Display, _2: c_int, _1: Option) -> Option, pub fn XESetWireToError (_3: *mut Display, _2: c_int, _1: Option c_int>) -> Option c_int>, pub fn XESetWireToEvent (_3: *mut Display, _2: c_int, _1: Option c_int>) -> Option c_int>, pub fn XESetWireToEventCookie (_3: *mut Display, _2: c_int, _1: Option c_int>) -> Option c_int>, pub fn XEventMaskOfScreen (_1: *mut Screen) -> c_long, pub fn XEventsQueued (_2: *mut Display, _1: c_int) -> c_int, pub fn XExtendedMaxRequestSize (_1: *mut Display) -> c_long, pub fn XExtentsOfFontSet (_1: XFontSet) -> *mut XFontSetExtents, pub fn XFetchBuffer (_3: *mut Display, _2: *mut c_int, _1: c_int) -> *mut c_char, pub fn XFetchBytes (_2: *mut Display, _1: *mut c_int) -> *mut c_char, pub fn XFetchName (_3: *mut Display, _2: c_ulong, _1: *mut *mut c_char) -> c_int, pub fn XFillArc (_9: *mut Display, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int, pub fn XFillArcs (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XArc, _1: c_int) -> c_int, pub fn XFillPolygon (_7: *mut Display, _6: c_ulong, _5: GC, _4: *mut XPoint, _3: c_int, _2: c_int, _1: c_int) -> c_int, pub fn XFillRectangle (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int, pub fn XFillRectangles (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XRectangle, _1: c_int) -> c_int, pub fn XFilterEvent (_2: *mut XEvent, _1: c_ulong) -> c_int, pub fn XFindContext (_4: *mut Display, _3: c_ulong, _2: c_int, _1: *mut *mut c_char) -> c_int, pub fn XFindOnExtensionList (_2: *mut *mut XExtData, _1: c_int) -> *mut XExtData, pub fn XFlush (_1: *mut Display) -> c_int, pub fn XFlushGC (_2: *mut Display, _1: GC) -> (), pub fn XFontsOfFontSet (_3: XFontSet, _2: *mut *mut *mut XFontStruct, _1: *mut *mut *mut c_char) -> c_int, pub fn XForceScreenSaver (_2: *mut Display, _1: c_int) -> c_int, pub fn XFree (_1: *mut c_void) -> c_int, pub fn XFreeColormap (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XFreeColors (_5: *mut Display, _4: c_ulong, _3: *mut c_ulong, _2: c_int, _1: c_ulong) -> c_int, pub fn XFreeCursor (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XFreeEventData (_2: *mut Display, _1: *mut XGenericEventCookie) -> (), pub fn XFreeExtensionList (_1: *mut *mut c_char) -> c_int, pub fn XFreeFont (_2: *mut Display, _1: *mut XFontStruct) -> c_int, pub fn XFreeFontInfo (_3: *mut *mut c_char, _2: *mut XFontStruct, _1: c_int) -> c_int, pub fn XFreeFontNames (_1: *mut *mut c_char) -> c_int, pub fn XFreeFontPath (_1: *mut *mut c_char) -> c_int, pub fn XFreeFontSet (_2: *mut Display, _1: XFontSet) -> (), pub fn XFreeGC (_2: *mut Display, _1: GC) -> c_int, pub fn XFreeModifiermap (_1: *mut XModifierKeymap) -> c_int, pub fn XFreePixmap (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XFreeStringList (_1: *mut *mut c_char) -> (), pub fn XGContextFromGC (_1: GC) -> c_ulong, pub fn XGeometry (_13: *mut Display, _12: c_int, _11: *const c_char, _10: *const c_char, _9: c_uint, _8: c_uint, _7: c_uint, _6: c_int, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XGetAtomName (_2: *mut Display, _1: c_ulong) -> *mut c_char, pub fn XGetAtomNames (_4: *mut Display, _3: *mut c_ulong, _2: c_int, _1: *mut *mut c_char) -> c_int, pub fn XGetClassHint (_3: *mut Display, _2: c_ulong, _1: *mut XClassHint) -> c_int, pub fn XGetCommand (_4: *mut Display, _3: c_ulong, _2: *mut *mut *mut c_char, _1: *mut c_int) -> c_int, pub fn XGetDefault (_3: *mut Display, _2: *const c_char, _1: *const c_char) -> *mut c_char, pub fn XGetErrorDatabaseText (_6: *mut Display, _5: *const c_char, _4: *const c_char, _3: *const c_char, _2: *mut c_char, _1: c_int) -> c_int, pub fn XGetErrorText (_4: *mut Display, _3: c_int, _2: *mut c_char, _1: c_int) -> c_int, pub fn XGetEventData (_2: *mut Display, _1: *mut XGenericEventCookie) -> c_int, pub fn XGetFontPath (_2: *mut Display, _1: *mut c_int) -> *mut *mut c_char, pub fn XGetFontProperty (_3: *mut XFontStruct, _2: c_ulong, _1: *mut c_ulong) -> c_int, pub fn XGetGCValues (_4: *mut Display, _3: GC, _2: c_ulong, _1: *mut XGCValues) -> c_int, pub fn XGetGeometry (_9: *mut Display, _8: c_ulong, _7: *mut c_ulong, _6: *mut c_int, _5: *mut c_int, _4: *mut c_uint, _3: *mut c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, pub fn XGetIconName (_3: *mut Display, _2: c_ulong, _1: *mut *mut c_char) -> c_int, pub fn XGetIconSizes (_4: *mut Display, _3: c_ulong, _2: *mut *mut XIconSize, _1: *mut c_int) -> c_int, pub fn XGetImage (_8: *mut Display, _7: c_ulong, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_ulong, _1: c_int) -> *mut XImage, pub fn XGetInputFocus (_3: *mut Display, _2: *mut c_ulong, _1: *mut c_int) -> c_int, pub fn XGetKeyboardControl (_2: *mut Display, _1: *mut XKeyboardState) -> c_int, pub fn XGetKeyboardMapping (_4: *mut Display, _3: c_uchar, _2: c_int, _1: *mut c_int) -> *mut c_ulong, pub fn XGetModifierMapping (_1: *mut Display) -> *mut XModifierKeymap, pub fn XGetMotionEvents (_5: *mut Display, _4: c_ulong, _3: c_ulong, _2: c_ulong, _1: *mut c_int) -> *mut XTimeCoord, pub fn XGetNormalHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int, pub fn XGetPixel (_3: *mut XImage, _2: c_int, _1: c_int) -> c_ulong, pub fn XGetPointerControl (_4: *mut Display, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XGetPointerMapping (_3: *mut Display, _2: *mut c_uchar, _1: c_int) -> c_int, pub fn XGetRGBColormaps (_5: *mut Display, _4: c_ulong, _3: *mut *mut XStandardColormap, _2: *mut c_int, _1: c_ulong) -> c_int, pub fn XGetScreenSaver (_5: *mut Display, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XGetSelectionOwner (_2: *mut Display, _1: c_ulong) -> c_ulong, pub fn XGetSizeHints (_4: *mut Display, _3: c_ulong, _2: *mut XSizeHints, _1: c_ulong) -> c_int, pub fn XGetStandardColormap (_4: *mut Display, _3: c_ulong, _2: *mut XStandardColormap, _1: c_ulong) -> c_int, pub fn XGetSubImage (_11: *mut Display, _10: c_ulong, _9: c_int, _8: c_int, _7: c_uint, _6: c_uint, _5: c_ulong, _4: c_int, _3: *mut XImage, _2: c_int, _1: c_int) -> *mut XImage, pub fn XGetTextProperty (_4: *mut Display, _3: c_ulong, _2: *mut XTextProperty, _1: c_ulong) -> c_int, pub fn XGetTransientForHint (_3: *mut Display, _2: c_ulong, _1: *mut c_ulong) -> c_int, pub fn XGetVisualInfo (_4: *mut Display, _3: c_long, _2: *mut XVisualInfo, _1: *mut c_int) -> *mut XVisualInfo, pub fn XGetWindowAttributes (_3: *mut Display, _2: c_ulong, _1: *mut XWindowAttributes) -> c_int, pub fn XGetWindowProperty (_12: *mut Display, _11: c_ulong, _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, pub fn XGetWMClientMachine (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> c_int, pub fn XGetWMColormapWindows (_4: *mut Display, _3: c_ulong, _2: *mut *mut c_ulong, _1: *mut c_int) -> c_int, pub fn XGetWMHints (_2: *mut Display, _1: c_ulong) -> *mut XWMHints, pub fn XGetWMIconName (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> c_int, pub fn XGetWMName (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> c_int, pub fn XGetWMNormalHints (_4: *mut Display, _3: c_ulong, _2: *mut XSizeHints, _1: *mut c_long) -> c_int, pub fn XGetWMProtocols (_4: *mut Display, _3: c_ulong, _2: *mut *mut c_ulong, _1: *mut c_int) -> c_int, pub fn XGetWMSizeHints (_5: *mut Display, _4: c_ulong, _3: *mut XSizeHints, _2: *mut c_long, _1: c_ulong) -> c_int, pub fn XGetZoomHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int, pub fn XGrabButton (_10: *mut Display, _9: c_uint, _8: c_uint, _7: c_ulong, _6: c_int, _5: c_uint, _4: c_int, _3: c_int, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XGrabKey (_7: *mut Display, _6: c_int, _5: c_uint, _4: c_ulong, _3: c_int, _2: c_int, _1: c_int) -> c_int, pub fn XGrabKeyboard (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XGrabPointer (_9: *mut Display, _8: c_ulong, _7: c_int, _6: c_uint, _5: c_int, _4: c_int, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XGrabServer (_1: *mut Display) -> c_int, pub fn XHeightMMOfScreen (_1: *mut Screen) -> c_int, pub fn XHeightOfScreen (_1: *mut Screen) -> c_int, pub fn XIconifyWindow (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int, pub fn XIfEvent (_4: *mut Display, _3: *mut XEvent, _2: Option c_int>, _1: *mut c_char) -> c_int, pub fn XImageByteOrder (_1: *mut Display) -> c_int, pub fn XIMOfIC (_1: XIC) -> XIM, pub fn XInitExtension (_2: *mut Display, _1: *const c_char) -> *mut XExtCodes, pub fn XInitImage (_1: *mut XImage) -> c_int, pub fn XInitThreads () -> c_int, pub fn XInsertModifiermapEntry (_3: *mut XModifierKeymap, _2: c_uchar, _1: c_int) -> *mut XModifierKeymap, pub fn XInstallColormap (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XInternalConnectionNumbers (_3: *mut Display, _2: *mut *mut c_int, _1: *mut c_int) -> c_int, pub fn XInternAtom (_3: *mut Display, _2: *const c_char, _1: c_int) -> c_ulong, pub fn XInternAtoms (_5: *mut Display, _4: *mut *mut c_char, _3: c_int, _2: c_int, _1: *mut c_ulong) -> c_int, pub fn XIntersectRegion (_3: Region, _2: Region, _1: Region) -> c_int, pub fn XkbAddDeviceLedInfo (_3: XkbDeviceInfoPtr, _2: c_uint, _1: c_uint) -> XkbDeviceLedInfoPtr, pub fn XkbAddGeomColor (_3: XkbGeometryPtr, _2: *mut c_char, _1: c_uint) -> XkbColorPtr, pub fn XkbAddGeomDoodad (_3: XkbGeometryPtr, _2: XkbSectionPtr, _1: c_ulong) -> XkbDoodadPtr, pub fn XkbAddGeomKey (_1: XkbRowPtr) -> XkbKeyPtr, pub fn XkbAddGeomKeyAlias (_3: XkbGeometryPtr, _2: *mut c_char, _1: *mut c_char) -> XkbKeyAliasPtr, pub fn XkbAddGeomOutline (_2: XkbShapePtr, _1: c_int) -> XkbOutlinePtr, pub fn XkbAddGeomOverlay (_3: XkbSectionPtr, _2: c_ulong, _1: c_int) -> XkbOverlayPtr, pub fn XkbAddGeomOverlayKey (_4: XkbOverlayPtr, _3: XkbOverlayRowPtr, _2: *mut c_char, _1: *mut c_char) -> XkbOverlayKeyPtr, pub fn XkbAddGeomOverlayRow (_3: XkbOverlayPtr, _2: c_int, _1: c_int) -> XkbOverlayRowPtr, pub fn XkbAddGeomProperty (_3: XkbGeometryPtr, _2: *mut c_char, _1: *mut c_char) -> XkbPropertyPtr, pub fn XkbAddGeomRow (_2: XkbSectionPtr, _1: c_int) -> XkbRowPtr, pub fn XkbAddGeomSection (_5: XkbGeometryPtr, _4: c_ulong, _3: c_int, _2: c_int, _1: c_int) -> XkbSectionPtr, pub fn XkbAddGeomShape (_3: XkbGeometryPtr, _2: c_ulong, _1: c_int) -> XkbShapePtr, pub fn XkbAddKeyType (_5: XkbDescPtr, _4: c_ulong, _3: c_int, _2: c_int, _1: c_int) -> XkbKeyTypePtr, pub fn XkbAllocClientMap (_3: XkbDescPtr, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbAllocCompatMap (_3: XkbDescPtr, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbAllocControls (_2: XkbDescPtr, _1: c_uint) -> c_int, pub fn XkbAllocDeviceInfo (_3: c_uint, _2: c_uint, _1: c_uint) -> XkbDeviceInfoPtr, pub fn XkbAllocGeomColors (_2: XkbGeometryPtr, _1: c_int) -> c_int, pub fn XkbAllocGeomDoodads (_2: XkbGeometryPtr, _1: c_int) -> c_int, pub fn XkbAllocGeometry (_2: XkbDescPtr, _1: XkbGeometrySizesPtr) -> c_int, pub fn XkbAllocGeomKeyAliases (_2: XkbGeometryPtr, _1: c_int) -> c_int, pub fn XkbAllocGeomKeys (_2: XkbRowPtr, _1: c_int) -> c_int, pub fn XkbAllocGeomOutlines (_2: XkbShapePtr, _1: c_int) -> c_int, pub fn XkbAllocGeomOverlayKeys (_2: XkbOverlayRowPtr, _1: c_int) -> c_int, pub fn XkbAllocGeomOverlayRows (_2: XkbOverlayPtr, _1: c_int) -> c_int, pub fn XkbAllocGeomOverlays (_2: XkbSectionPtr, _1: c_int) -> c_int, pub fn XkbAllocGeomPoints (_2: XkbOutlinePtr, _1: c_int) -> c_int, pub fn XkbAllocGeomProps (_2: XkbGeometryPtr, _1: c_int) -> c_int, pub fn XkbAllocGeomRows (_2: XkbSectionPtr, _1: c_int) -> c_int, pub fn XkbAllocGeomSectionDoodads (_2: XkbSectionPtr, _1: c_int) -> c_int, pub fn XkbAllocGeomSections (_2: XkbGeometryPtr, _1: c_int) -> c_int, pub fn XkbAllocGeomShapes (_2: XkbGeometryPtr, _1: c_int) -> c_int, pub fn XkbAllocIndicatorMaps (_1: XkbDescPtr) -> c_int, pub fn XkbAllocKeyboard () -> XkbDescPtr, pub fn XkbAllocNames (_4: XkbDescPtr, _3: c_uint, _2: c_int, _1: c_int) -> c_int, pub fn XkbAllocServerMap (_3: XkbDescPtr, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbApplyCompatMapToKey (_3: XkbDescPtr, _2: c_uchar, _1: XkbChangesPtr) -> c_int, pub fn XkbApplyVirtualModChanges (_3: XkbDescPtr, _2: c_uint, _1: XkbChangesPtr) -> c_int, pub fn XkbBell (_4: *mut Display, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int, pub fn XkbBellEvent (_4: *mut Display, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int, pub fn XkbChangeDeviceInfo (_3: *mut Display, _2: XkbDeviceInfoPtr, _1: XkbDeviceChangesPtr) -> c_int, pub fn XkbChangeEnabledControls (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbChangeKeycodeRange (_4: XkbDescPtr, _3: c_int, _2: c_int, _1: XkbChangesPtr) -> c_int, pub fn XkbChangeMap (_3: *mut Display, _2: XkbDescPtr, _1: XkbMapChangesPtr) -> c_int, pub fn XkbChangeNames (_3: *mut Display, _2: XkbDescPtr, _1: XkbNameChangesPtr) -> c_int, pub fn XkbChangeTypesOfKey (_6: XkbDescPtr, _5: c_int, _4: c_int, _3: c_uint, _2: *mut c_int, _1: XkbMapChangesPtr) -> c_int, pub fn XkbComputeEffectiveMap (_3: XkbDescPtr, _2: XkbKeyTypePtr, _1: *mut c_uchar) -> c_int, pub fn XkbComputeRowBounds (_3: XkbGeometryPtr, _2: XkbSectionPtr, _1: XkbRowPtr) -> c_int, pub fn XkbComputeSectionBounds (_2: XkbGeometryPtr, _1: XkbSectionPtr) -> c_int, pub fn XkbComputeShapeBounds (_1: XkbShapePtr) -> c_int, pub fn XkbComputeShapeTop (_2: XkbShapePtr, _1: XkbBoundsPtr) -> c_int, pub fn XkbCopyKeyType (_2: XkbKeyTypePtr, _1: XkbKeyTypePtr) -> c_int, pub fn XkbCopyKeyTypes (_3: XkbKeyTypePtr, _2: XkbKeyTypePtr, _1: c_int) -> c_int, pub fn XkbDeviceBell (_7: *mut Display, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XkbDeviceBellEvent (_7: *mut Display, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XkbFindOverlayForKey (_3: XkbGeometryPtr, _2: XkbSectionPtr, _1: *mut c_char) -> *mut c_char, pub fn XkbForceBell (_2: *mut Display, _1: c_int) -> c_int, pub fn XkbForceDeviceBell (_5: *mut Display, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int, pub fn XkbFreeClientMap (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (), pub fn XkbFreeCompatMap (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (), pub fn XkbFreeComponentList (_1: XkbComponentListPtr) -> (), pub fn XkbFreeControls (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (), pub fn XkbFreeDeviceInfo (_3: XkbDeviceInfoPtr, _2: c_uint, _1: c_int) -> (), pub fn XkbFreeGeomColors (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XkbFreeGeomDoodads (_3: XkbDoodadPtr, _2: c_int, _1: c_int) -> (), pub fn XkbFreeGeometry (_3: XkbGeometryPtr, _2: c_uint, _1: c_int) -> (), pub fn XkbFreeGeomKeyAliases (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XkbFreeGeomKeys (_4: XkbRowPtr, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XkbFreeGeomOutlines (_4: XkbShapePtr, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XkbFreeGeomOverlayKeys (_4: XkbOverlayRowPtr, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XkbFreeGeomOverlayRows (_4: XkbOverlayPtr, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XkbFreeGeomOverlays (_4: XkbSectionPtr, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XkbFreeGeomPoints (_4: XkbOutlinePtr, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XkbFreeGeomProperties (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XkbFreeGeomRows (_4: XkbSectionPtr, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XkbFreeGeomSections (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XkbFreeGeomShapes (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XkbFreeIndicatorMaps (_1: XkbDescPtr) -> (), pub fn XkbFreeKeyboard (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (), pub fn XkbFreeNames (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (), pub fn XkbFreeServerMap (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (), pub fn XkbGetAutoRepeatRate (_4: *mut Display, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, pub fn XkbGetAutoResetControls (_3: *mut Display, _2: *mut c_uint, _1: *mut c_uint) -> c_int, pub fn XkbGetCompatMap (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int, pub fn XkbGetControls (_3: *mut Display, _2: c_ulong, _1: XkbDescPtr) -> c_int, pub fn XkbGetDetectableAutoRepeat (_2: *mut Display, _1: *mut c_int) -> c_int, pub fn XkbGetDeviceButtonActions (_5: *mut Display, _4: XkbDeviceInfoPtr, _3: c_int, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbGetDeviceInfo (_5: *mut Display, _4: c_uint, _3: c_uint, _2: c_uint, _1: c_uint) -> XkbDeviceInfoPtr, pub fn XkbGetDeviceInfoChanges (_3: *mut Display, _2: XkbDeviceInfoPtr, _1: XkbDeviceChangesPtr) -> c_int, pub fn XkbGetDeviceLedInfo (_5: *mut Display, _4: XkbDeviceInfoPtr, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbGetGeometry (_2: *mut Display, _1: XkbDescPtr) -> c_int, pub fn XkbGetIndicatorMap (_3: *mut Display, _2: c_ulong, _1: XkbDescPtr) -> c_int, pub fn XkbGetIndicatorState (_3: *mut Display, _2: c_uint, _1: *mut c_uint) -> c_int, pub fn XkbGetKeyActions (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, pub fn XkbGetKeyBehaviors (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, pub fn XkbGetKeyboard (_3: *mut Display, _2: c_uint, _1: c_uint) -> XkbDescPtr, pub fn XkbGetKeyboardByName (_6: *mut Display, _5: c_uint, _4: XkbComponentNamesPtr, _3: c_uint, _2: c_uint, _1: c_int) -> XkbDescPtr, pub fn XkbGetKeyExplicitComponents (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, pub fn XkbGetKeyModifierMap (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, pub fn XkbGetKeySyms (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, pub fn XkbGetKeyTypes (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, pub fn XkbGetKeyVirtualModMap (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, pub fn XkbGetMap (_3: *mut Display, _2: c_uint, _1: c_uint) -> XkbDescPtr, pub fn XkbGetMapChanges (_3: *mut Display, _2: XkbDescPtr, _1: XkbMapChangesPtr) -> c_int, pub fn XkbGetNamedDeviceIndicator (_9: *mut Display, _8: c_uint, _7: c_uint, _6: c_uint, _5: c_ulong, _4: *mut c_int, _3: *mut c_int, _2: XkbIndicatorMapPtr, _1: *mut c_int) -> c_int, pub fn XkbGetNamedGeometry (_3: *mut Display, _2: XkbDescPtr, _1: c_ulong) -> c_int, pub fn XkbGetNamedIndicator (_6: *mut Display, _5: c_ulong, _4: *mut c_int, _3: *mut c_int, _2: XkbIndicatorMapPtr, _1: *mut c_int) -> c_int, pub fn XkbGetNames (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int, pub fn XkbGetPerClientControls (_2: *mut Display, _1: *mut c_uint) -> c_int, pub fn XkbGetState (_3: *mut Display, _2: c_uint, _1: XkbStatePtr) -> c_int, pub fn XkbGetUpdatedMap (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int, pub fn XkbGetVirtualMods (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int, pub fn XkbGetXlibControls (_1: *mut Display) -> c_uint, pub fn XkbIgnoreExtension (_1: c_int) -> c_int, pub fn XkbInitCanonicalKeyTypes (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> c_int, pub fn XkbKeycodeToKeysym (_4: *mut Display, _3: c_uchar, _2: c_int, _1: c_int) -> c_ulong, pub fn XkbKeysymToModifiers (_2: *mut Display, _1: c_ulong) -> c_uint, pub fn XkbKeyTypesForCoreSymbols (_6: XkbDescPtr, _5: c_int, _4: *mut c_ulong, _3: c_uint, _2: *mut c_int, _1: *mut c_ulong) -> c_int, pub fn XkbLatchGroup (_3: *mut Display, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbLatchModifiers (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbLibraryVersion (_2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XkbListComponents (_4: *mut Display, _3: c_uint, _2: XkbComponentNamesPtr, _1: *mut c_int) -> XkbComponentListPtr, pub fn XkbLockGroup (_3: *mut Display, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbLockModifiers (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbLookupKeyBinding (_6: *mut Display, _5: c_ulong, _4: c_uint, _3: *mut c_char, _2: c_int, _1: *mut c_int) -> c_int, pub fn XkbLookupKeySym (_5: *mut Display, _4: c_uchar, _3: c_uint, _2: *mut c_uint, _1: *mut c_ulong) -> c_int, pub fn XkbNoteControlsChanges (_3: XkbControlsChangesPtr, _2: *mut XkbControlsNotifyEvent, _1: c_uint) -> (), pub fn XkbNoteDeviceChanges (_3: XkbDeviceChangesPtr, _2: *mut XkbExtensionDeviceNotifyEvent, _1: c_uint) -> (), pub fn XkbNoteMapChanges (_3: XkbMapChangesPtr, _2: *mut XkbMapNotifyEvent, _1: c_uint) -> (), pub fn XkbNoteNameChanges (_3: XkbNameChangesPtr, _2: *mut XkbNamesNotifyEvent, _1: c_uint) -> (), pub fn XkbOpenDisplay (_6: *mut c_char, _5: *mut c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> *mut Display, pub fn XkbQueryExtension (_6: *mut Display, _5: *mut c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XkbRefreshKeyboardMapping (_1: *mut XkbMapNotifyEvent) -> c_int, pub fn XkbResizeDeviceButtonActions (_2: XkbDeviceInfoPtr, _1: c_uint) -> c_int, pub fn XkbResizeKeyActions (_3: XkbDescPtr, _2: c_int, _1: c_int) -> *mut XkbAction, pub fn XkbResizeKeySyms (_3: XkbDescPtr, _2: c_int, _1: c_int) -> *mut c_ulong, pub fn XkbResizeKeyType (_5: XkbDescPtr, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int, pub fn XkbSelectEventDetails (_5: *mut Display, _4: c_uint, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XkbSelectEvents (_4: *mut Display, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XkbSetAtomFuncs (_2: Option c_ulong>, _1: Option *mut c_char>) -> (), pub fn XkbSetAutoRepeatRate (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbSetAutoResetControls (_4: *mut Display, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, pub fn XkbSetCompatMap (_4: *mut Display, _3: c_uint, _2: XkbDescPtr, _1: c_int) -> c_int, pub fn XkbSetControls (_3: *mut Display, _2: c_ulong, _1: XkbDescPtr) -> c_int, pub fn XkbSetDebuggingFlags (_8: *mut Display, _7: c_uint, _6: c_uint, _5: *mut c_char, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, pub fn XkbSetDetectableAutoRepeat (_3: *mut Display, _2: c_int, _1: *mut c_int) -> c_int, pub fn XkbSetDeviceButtonActions (_4: *mut Display, _3: XkbDeviceInfoPtr, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbSetDeviceInfo (_3: *mut Display, _2: c_uint, _1: XkbDeviceInfoPtr) -> c_int, pub fn XkbSetDeviceLedInfo (_5: *mut Display, _4: XkbDeviceInfoPtr, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbSetGeometry (_3: *mut Display, _2: c_uint, _1: XkbGeometryPtr) -> c_int, pub fn XkbSetIgnoreLockMods (_6: *mut Display, _5: c_uint, _4: c_uint, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbSetIndicatorMap (_3: *mut Display, _2: c_ulong, _1: XkbDescPtr) -> c_int, pub fn XkbSetMap (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int, pub fn XkbSetNamedDeviceIndicator (_9: *mut Display, _8: c_uint, _7: c_uint, _6: c_uint, _5: c_ulong, _4: c_int, _3: c_int, _2: c_int, _1: XkbIndicatorMapPtr) -> c_int, pub fn XkbSetNamedIndicator (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: c_int, _1: XkbIndicatorMapPtr) -> c_int, pub fn XkbSetNames (_5: *mut Display, _4: c_uint, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int, pub fn XkbSetPerClientControls (_3: *mut Display, _2: c_uint, _1: *mut c_uint) -> c_int, pub fn XkbSetServerInternalMods (_6: *mut Display, _5: c_uint, _4: c_uint, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int, pub fn XkbSetXlibControls (_3: *mut Display, _2: c_uint, _1: c_uint) -> c_uint, pub fn XkbToControl (_1: c_char) -> c_char, pub fn XkbTranslateKeyCode (_5: XkbDescPtr, _4: c_uchar, _3: c_uint, _2: *mut c_uint, _1: *mut c_ulong) -> c_int, pub fn XkbTranslateKeySym (_6: *mut Display, _5: *mut c_ulong, _4: c_uint, _3: *mut c_char, _2: c_int, _1: *mut c_int) -> c_int, pub fn XkbUpdateActionVirtualMods (_3: XkbDescPtr, _2: *mut XkbAction, _1: c_uint) -> c_int, pub fn XkbUpdateKeyTypeVirtualMods (_4: XkbDescPtr, _3: XkbKeyTypePtr, _2: c_uint, _1: XkbChangesPtr) -> (), pub fn XkbUpdateMapFromCore (_6: XkbDescPtr, _5: c_uchar, _4: c_int, _3: c_int, _2: *mut c_ulong, _1: XkbChangesPtr) -> c_int, pub fn XkbUseExtension (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XkbVirtualModsToReal (_3: XkbDescPtr, _2: c_uint, _1: *mut c_uint) -> c_int, pub fn XkbXlibControlsImplemented () -> c_uint, pub fn XKeycodeToKeysym (_3: *mut Display, _2: c_uchar, _1: c_int) -> c_ulong, pub fn XKeysymToKeycode (_2: *mut Display, _1: c_ulong) -> c_uchar, pub fn XKeysymToString (_1: c_ulong) -> *mut c_char, pub fn XKillClient (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XLastKnownRequestProcessed (_1: *mut Display) -> c_ulong, pub fn XListDepths (_3: *mut Display, _2: c_int, _1: *mut c_int) -> *mut c_int, pub fn XListExtensions (_2: *mut Display, _1: *mut c_int) -> *mut *mut c_char, pub fn XListFonts (_4: *mut Display, _3: *const c_char, _2: c_int, _1: *mut c_int) -> *mut *mut c_char, pub fn XListFontsWithInfo (_5: *mut Display, _4: *const c_char, _3: c_int, _2: *mut c_int, _1: *mut *mut XFontStruct) -> *mut *mut c_char, pub fn XListHosts (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> *mut XHostAddress, pub fn XListInstalledColormaps (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> *mut c_ulong, pub fn XListPixmapFormats (_2: *mut Display, _1: *mut c_int) -> *mut XPixmapFormatValues, pub fn XListProperties (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> *mut c_ulong, pub fn XLoadFont (_2: *mut Display, _1: *const c_char) -> c_ulong, pub fn XLoadQueryFont (_2: *mut Display, _1: *const c_char) -> *mut XFontStruct, pub fn XLocaleOfFontSet (_1: XFontSet) -> *mut c_char, pub fn XLocaleOfIM (_1: XIM) -> *mut c_char, pub fn XLocaleOfOM (_1: XOM) -> *mut c_char, pub fn XLockDisplay (_1: *mut Display) -> (), pub fn XLookupColor (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: *mut XColor, _1: *mut XColor) -> c_int, pub fn XLookupKeysym (_2: *mut XKeyEvent, _1: c_int) -> c_ulong, pub fn XLookupString (_5: *mut XKeyEvent, _4: *mut c_char, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, pub fn XLowerWindow (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XMapRaised (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XMapSubwindows (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XMapWindow (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XMaskEvent (_3: *mut Display, _2: c_long, _1: *mut XEvent) -> c_int, pub fn XMatchVisualInfo (_5: *mut Display, _4: c_int, _3: c_int, _2: c_int, _1: *mut XVisualInfo) -> c_int, pub fn XMaxCmapsOfScreen (_1: *mut Screen) -> c_int, pub fn XMaxRequestSize (_1: *mut Display) -> c_long, pub fn XmbDrawImageString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (), pub fn XmbDrawString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (), pub fn XmbDrawText (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XmbTextItem, _1: c_int) -> (), pub fn XmbLookupString (_6: XIC, _5: *mut XKeyEvent, _4: *mut c_char, _3: c_int, _2: *mut c_ulong, _1: *mut c_int) -> c_int, pub fn XmbResetIC (_1: XIC) -> *mut c_char, pub fn XmbSetWMProperties (_9: *mut Display, _8: c_ulong, _7: *const c_char, _6: *const c_char, _5: *mut *mut c_char, _4: c_int, _3: *mut XSizeHints, _2: *mut XWMHints, _1: *mut XClassHint) -> (), pub fn XmbTextEscapement (_3: XFontSet, _2: *const c_char, _1: c_int) -> c_int, pub fn XmbTextExtents (_5: XFontSet, _4: *const c_char, _3: c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int, pub fn XmbTextListToTextProperty (_5: *mut Display, _4: *mut *mut c_char, _3: c_int, _2: XICCEncodingStyle, _1: *mut XTextProperty) -> c_int, pub fn XmbTextPerCharExtents (_9: XFontSet, _8: *const c_char, _7: c_int, _6: *mut XRectangle, _5: *mut XRectangle, _4: c_int, _3: *mut c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int, pub fn XmbTextPropertyToTextList (_4: *mut Display, _3: *const XTextProperty, _2: *mut *mut *mut c_char, _1: *mut c_int) -> c_int, pub fn XMinCmapsOfScreen (_1: *mut Screen) -> c_int, pub fn XMoveResizeWindow (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int, pub fn XMoveWindow (_4: *mut Display, _3: c_ulong, _2: c_int, _1: c_int) -> c_int, pub fn XNewModifiermap (_1: c_int) -> *mut XModifierKeymap, pub fn XNextEvent (_2: *mut Display, _1: *mut XEvent) -> c_int, pub fn XNextRequest (_1: *mut Display) -> c_ulong, pub fn XNoOp (_1: *mut Display) -> c_int, pub fn XOffsetRegion (_3: Region, _2: c_int, _1: c_int) -> c_int, pub fn XOMOfOC (_1: XFontSet) -> XOM, pub fn XOpenDisplay (_1: *const c_char) -> *mut Display, pub fn XOpenIM (_4: *mut Display, _3: XrmDatabase, _2: *mut c_char, _1: *mut c_char) -> XIM, pub fn XOpenOM (_4: *mut Display, _3: XrmDatabase, _2: *const c_char, _1: *const c_char) -> XOM, pub fn XParseColor (_4: *mut Display, _3: c_ulong, _2: *const c_char, _1: *mut XColor) -> c_int, pub fn XParseGeometry (_5: *const c_char, _4: *mut c_int, _3: *mut c_int, _2: *mut c_uint, _1: *mut c_uint) -> c_int, pub fn XPeekEvent (_2: *mut Display, _1: *mut XEvent) -> c_int, pub fn XPeekIfEvent (_4: *mut Display, _3: *mut XEvent, _2: Option c_int>, _1: *mut c_char) -> c_int, pub fn XPending (_1: *mut Display) -> c_int, pub fn Xpermalloc (_1: c_uint) -> *mut c_char, pub fn XPlanesOfScreen (_1: *mut Screen) -> c_int, pub fn XPointInRegion (_3: Region, _2: c_int, _1: c_int) -> c_int, pub fn XPolygonRegion (_3: *mut XPoint, _2: c_int, _1: c_int) -> Region, pub fn XProcessInternalConnection (_2: *mut Display, _1: c_int) -> (), pub fn XProtocolRevision (_1: *mut Display) -> c_int, pub fn XProtocolVersion (_1: *mut Display) -> c_int, pub fn XPutBackEvent (_2: *mut Display, _1: *mut XEvent) -> c_int, pub fn XPutImage (_10: *mut Display, _9: c_ulong, _8: GC, _7: *mut XImage, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int, pub fn XPutPixel (_4: *mut XImage, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XQLength (_1: *mut Display) -> c_int, pub fn XQueryBestCursor (_6: *mut Display, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, pub fn XQueryBestSize (_7: *mut Display, _6: c_int, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, pub fn XQueryBestStipple (_6: *mut Display, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, pub fn XQueryBestTile (_6: *mut Display, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int, pub fn XQueryColor (_3: *mut Display, _2: c_ulong, _1: *mut XColor) -> c_int, pub fn XQueryColors (_4: *mut Display, _3: c_ulong, _2: *mut XColor, _1: c_int) -> c_int, pub fn XQueryExtension (_5: *mut Display, _4: *const c_char, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XQueryFont (_2: *mut Display, _1: c_ulong) -> *mut XFontStruct, pub fn XQueryKeymap (_2: *mut Display, _1: *mut c_char) -> c_int, pub fn XQueryPointer (_9: *mut Display, _8: c_ulong, _7: *mut c_ulong, _6: *mut c_ulong, _5: *mut c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_uint) -> c_int, pub fn XQueryTextExtents (_8: *mut Display, _7: c_ulong, _6: *const c_char, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XCharStruct) -> c_int, pub fn XQueryTextExtents16 (_8: *mut Display, _7: c_ulong, _6: *const XChar2b, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XCharStruct) -> c_int, pub fn XQueryTree (_6: *mut Display, _5: c_ulong, _4: *mut c_ulong, _3: *mut c_ulong, _2: *mut *mut c_ulong, _1: *mut c_uint) -> c_int, pub fn XRaiseWindow (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XReadBitmapFile (_8: *mut Display, _7: c_ulong, _6: *const c_char, _5: *mut c_uint, _4: *mut c_uint, _3: *mut c_ulong, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XReadBitmapFileData (_6: *const c_char, _5: *mut c_uint, _4: *mut c_uint, _3: *mut *mut c_uchar, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XRebindKeysym (_6: *mut Display, _5: c_ulong, _4: *mut c_ulong, _3: c_int, _2: *const c_uchar, _1: c_int) -> c_int, pub fn XRecolorCursor (_4: *mut Display, _3: c_ulong, _2: *mut XColor, _1: *mut XColor) -> c_int, pub fn XReconfigureWMWindow (_5: *mut Display, _4: c_ulong, _3: c_int, _2: c_uint, _1: *mut XWindowChanges) -> c_int, pub fn XRectInRegion (_5: Region, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int, pub fn XRefreshKeyboardMapping (_1: *mut XMappingEvent) -> c_int, pub fn XRegisterIMInstantiateCallback (_6: *mut Display, _5: XrmDatabase, _4: *mut c_char, _3: *mut c_char, _2: Option, _1: *mut c_char) -> c_int, pub fn XRemoveConnectionWatch (_3: *mut Display, _2: Option, _1: *mut c_char) -> (), pub fn XRemoveFromSaveSet (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XRemoveHost (_2: *mut Display, _1: *mut XHostAddress) -> c_int, pub fn XRemoveHosts (_3: *mut Display, _2: *mut XHostAddress, _1: c_int) -> c_int, pub fn XReparentWindow (_5: *mut Display, _4: c_ulong, _3: c_ulong, _2: c_int, _1: c_int) -> c_int, pub fn XResetScreenSaver (_1: *mut Display) -> c_int, pub fn XResizeWindow (_4: *mut Display, _3: c_ulong, _2: c_uint, _1: c_uint) -> c_int, pub fn XResourceManagerString (_1: *mut Display) -> *mut c_char, pub fn XRestackWindows (_3: *mut Display, _2: *mut c_ulong, _1: c_int) -> c_int, pub fn XrmCombineDatabase (_3: XrmDatabase, _2: *mut XrmDatabase, _1: c_int) -> (), pub fn XrmCombineFileDatabase (_3: *const c_char, _2: *mut XrmDatabase, _1: c_int) -> c_int, pub fn XrmDestroyDatabase (_1: XrmDatabase) -> (), pub fn XrmEnumerateDatabase (_6: XrmDatabase, _5: *mut c_int, _4: *mut c_int, _3: c_int, _2: Option c_int>, _1: *mut c_char) -> c_int, pub fn XrmGetDatabase (_1: *mut Display) -> XrmDatabase, pub fn XrmGetFileDatabase (_1: *const c_char) -> XrmDatabase, pub fn XrmGetResource (_5: XrmDatabase, _4: *const c_char, _3: *const c_char, _2: *mut *mut c_char, _1: *mut XrmValue) -> c_int, pub fn XrmGetStringDatabase (_1: *const c_char) -> XrmDatabase, pub fn XrmInitialize () -> (), pub fn XrmLocaleOfDatabase (_1: XrmDatabase) -> *const c_char, pub fn XrmMergeDatabases (_2: XrmDatabase, _1: *mut XrmDatabase) -> (), pub fn XrmParseCommand (_6: *mut XrmDatabase, _5: XrmOptionDescList, _4: c_int, _3: *const c_char, _2: *mut c_int, _1: *mut *mut c_char) -> (), pub fn XrmPermStringToQuark (_1: *const c_char) -> c_int, pub fn XrmPutFileDatabase (_2: XrmDatabase, _1: *const c_char) -> (), pub fn XrmPutLineResource (_2: *mut XrmDatabase, _1: *const c_char) -> (), pub fn XrmPutResource (_4: *mut XrmDatabase, _3: *const c_char, _2: *const c_char, _1: *mut XrmValue) -> (), pub fn XrmPutStringResource (_3: *mut XrmDatabase, _2: *const c_char, _1: *const c_char) -> (), pub fn XrmQGetResource (_5: XrmDatabase, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XrmValue) -> c_int, pub fn XrmQGetSearchList (_5: XrmDatabase, _4: *mut c_int, _3: *mut c_int, _2: *mut *mut XrmDatabase, _1: c_int) -> c_int, pub fn XrmQGetSearchResource (_5: *mut *mut XrmDatabase, _4: c_int, _3: c_int, _2: *mut c_int, _1: *mut XrmValue) -> c_int, pub fn XrmQPutResource (_5: *mut XrmDatabase, _4: *mut XrmBinding, _3: *mut c_int, _2: c_int, _1: *mut XrmValue) -> (), pub fn XrmQPutStringResource (_4: *mut XrmDatabase, _3: *mut XrmBinding, _2: *mut c_int, _1: *const c_char) -> (), pub fn XrmQuarkToString (_1: c_int) -> *mut c_char, pub fn XrmSetDatabase (_2: *mut Display, _1: XrmDatabase) -> (), pub fn XrmStringToBindingQuarkList (_3: *const c_char, _2: *mut XrmBinding, _1: *mut c_int) -> (), pub fn XrmStringToQuark (_1: *const c_char) -> c_int, pub fn XrmStringToQuarkList (_2: *const c_char, _1: *mut c_int) -> (), pub fn XrmUniqueQuark () -> c_int, pub fn XRootWindow (_2: *mut Display, _1: c_int) -> c_ulong, pub fn XRootWindowOfScreen (_1: *mut Screen) -> c_ulong, pub fn XRotateBuffers (_2: *mut Display, _1: c_int) -> c_int, pub fn XRotateWindowProperties (_5: *mut Display, _4: c_ulong, _3: *mut c_ulong, _2: c_int, _1: c_int) -> c_int, pub fn XSaveContext (_4: *mut Display, _3: c_ulong, _2: c_int, _1: *const c_char) -> c_int, pub fn XScreenCount (_1: *mut Display) -> c_int, pub fn XScreenNumberOfScreen (_1: *mut Screen) -> c_int, pub fn XScreenOfDisplay (_2: *mut Display, _1: c_int) -> *mut Screen, pub fn XScreenResourceString (_1: *mut Screen) -> *mut c_char, pub fn XSelectInput (_3: *mut Display, _2: c_ulong, _1: c_long) -> c_int, pub fn XSendEvent (_5: *mut Display, _4: c_ulong, _3: c_int, _2: c_long, _1: *mut XEvent) -> c_int, pub fn XServerVendor (_1: *mut Display) -> *mut c_char, pub fn XSetAccessControl (_2: *mut Display, _1: c_int) -> c_int, pub fn XSetAfterFunction (_2: *mut Display, _1: Option c_int>) -> Option c_int>, pub fn XSetArcMode (_3: *mut Display, _2: GC, _1: c_int) -> c_int, pub fn XSetAuthorization (_4: *mut c_char, _3: c_int, _2: *mut c_char, _1: c_int) -> (), pub fn XSetBackground (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, pub fn XSetClassHint (_3: *mut Display, _2: c_ulong, _1: *mut XClassHint) -> c_int, pub fn XSetClipMask (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, pub fn XSetClipOrigin (_4: *mut Display, _3: GC, _2: c_int, _1: c_int) -> c_int, pub fn XSetClipRectangles (_7: *mut Display, _6: GC, _5: c_int, _4: c_int, _3: *mut XRectangle, _2: c_int, _1: c_int) -> c_int, pub fn XSetCloseDownMode (_2: *mut Display, _1: c_int) -> c_int, pub fn XSetCommand (_4: *mut Display, _3: c_ulong, _2: *mut *mut c_char, _1: c_int) -> c_int, pub fn XSetDashes (_5: *mut Display, _4: GC, _3: c_int, _2: *const c_char, _1: c_int) -> c_int, pub fn XSetErrorHandler (_1: Option c_int>) -> Option c_int>, pub fn XSetFillRule (_3: *mut Display, _2: GC, _1: c_int) -> c_int, pub fn XSetFillStyle (_3: *mut Display, _2: GC, _1: c_int) -> c_int, pub fn XSetFont (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, pub fn XSetFontPath (_3: *mut Display, _2: *mut *mut c_char, _1: c_int) -> c_int, pub fn XSetForeground (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, pub fn XSetFunction (_3: *mut Display, _2: GC, _1: c_int) -> c_int, pub fn XSetGraphicsExposures (_3: *mut Display, _2: GC, _1: c_int) -> c_int, pub fn XSetICFocus (_1: XIC) -> (), pub fn XSetIconName (_3: *mut Display, _2: c_ulong, _1: *const c_char) -> c_int, pub fn XSetIconSizes (_4: *mut Display, _3: c_ulong, _2: *mut XIconSize, _1: c_int) -> c_int, pub fn XSetInputFocus (_4: *mut Display, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int, pub fn XSetIOErrorHandler (_1: Option c_int>) -> Option c_int>, pub fn XSetLineAttributes (_6: *mut Display, _5: GC, _4: c_uint, _3: c_int, _2: c_int, _1: c_int) -> c_int, pub fn XSetLocaleModifiers (_1: *const c_char) -> *mut c_char, pub fn XSetModifierMapping (_2: *mut Display, _1: *mut XModifierKeymap) -> c_int, pub fn XSetNormalHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int, pub fn XSetPlaneMask (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, pub fn XSetPointerMapping (_3: *mut Display, _2: *const c_uchar, _1: c_int) -> c_int, pub fn XSetRegion (_3: *mut Display, _2: GC, _1: Region) -> c_int, pub fn XSetRGBColormaps (_5: *mut Display, _4: c_ulong, _3: *mut XStandardColormap, _2: c_int, _1: c_ulong) -> (), pub fn XSetScreenSaver (_5: *mut Display, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int, pub fn XSetSelectionOwner (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XSetSizeHints (_4: *mut Display, _3: c_ulong, _2: *mut XSizeHints, _1: c_ulong) -> c_int, pub fn XSetStandardColormap (_4: *mut Display, _3: c_ulong, _2: *mut XStandardColormap, _1: c_ulong) -> (), pub fn XSetStandardProperties (_8: *mut Display, _7: c_ulong, _6: *const c_char, _5: *const c_char, _4: c_ulong, _3: *mut *mut c_char, _2: c_int, _1: *mut XSizeHints) -> c_int, pub fn XSetState (_6: *mut Display, _5: GC, _4: c_ulong, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int, pub fn XSetStipple (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, pub fn XSetSubwindowMode (_3: *mut Display, _2: GC, _1: c_int) -> c_int, pub fn XSetTextProperty (_4: *mut Display, _3: c_ulong, _2: *mut XTextProperty, _1: c_ulong) -> (), pub fn XSetTile (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int, pub fn XSetTransientForHint (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XSetTSOrigin (_4: *mut Display, _3: GC, _2: c_int, _1: c_int) -> c_int, pub fn XSetWindowBackground (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XSetWindowBackgroundPixmap (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XSetWindowBorder (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XSetWindowBorderPixmap (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XSetWindowBorderWidth (_3: *mut Display, _2: c_ulong, _1: c_uint) -> c_int, pub fn XSetWindowColormap (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XSetWMClientMachine (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> (), pub fn XSetWMColormapWindows (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: c_int) -> c_int, pub fn XSetWMHints (_3: *mut Display, _2: c_ulong, _1: *mut XWMHints) -> c_int, pub fn XSetWMIconName (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> (), pub fn XSetWMName (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> (), pub fn XSetWMNormalHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> (), pub fn XSetWMProperties (_9: *mut Display, _8: c_ulong, _7: *mut XTextProperty, _6: *mut XTextProperty, _5: *mut *mut c_char, _4: c_int, _3: *mut XSizeHints, _2: *mut XWMHints, _1: *mut XClassHint) -> (), pub fn XSetWMProtocols (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: c_int) -> c_int, pub fn XSetWMSizeHints (_4: *mut Display, _3: c_ulong, _2: *mut XSizeHints, _1: c_ulong) -> (), pub fn XSetZoomHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int, pub fn XShrinkRegion (_3: Region, _2: c_int, _1: c_int) -> c_int, pub fn XStoreBuffer (_4: *mut Display, _3: *const c_char, _2: c_int, _1: c_int) -> c_int, pub fn XStoreBytes (_3: *mut Display, _2: *const c_char, _1: c_int) -> c_int, pub fn XStoreColor (_3: *mut Display, _2: c_ulong, _1: *mut XColor) -> c_int, pub fn XStoreColors (_4: *mut Display, _3: c_ulong, _2: *mut XColor, _1: c_int) -> c_int, pub fn XStoreName (_3: *mut Display, _2: c_ulong, _1: *const c_char) -> c_int, pub fn XStoreNamedColor (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: c_ulong, _1: c_int) -> c_int, pub fn XStringListToTextProperty (_3: *mut *mut c_char, _2: c_int, _1: *mut XTextProperty) -> c_int, pub fn XStringToKeysym (_1: *const c_char) -> c_ulong, pub fn XSubImage (_5: *mut XImage, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> *mut XImage, pub fn XSubtractRegion (_3: Region, _2: Region, _1: Region) -> c_int, pub fn XSupportsLocale () -> c_int, pub fn XSync (_2: *mut Display, _1: c_int) -> c_int, pub fn XSynchronize (_2: *mut Display, _1: c_int) -> Option c_int>, pub fn XTextExtents (_7: *mut XFontStruct, _6: *const c_char, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XCharStruct) -> c_int, pub fn XTextExtents16 (_7: *mut XFontStruct, _6: *const XChar2b, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XCharStruct) -> c_int, pub fn XTextPropertyToStringList (_3: *mut XTextProperty, _2: *mut *mut *mut c_char, _1: *mut c_int) -> c_int, pub fn XTextWidth (_3: *mut XFontStruct, _2: *const c_char, _1: c_int) -> c_int, pub fn XTextWidth16 (_3: *mut XFontStruct, _2: *const XChar2b, _1: c_int) -> c_int, pub fn XTranslateCoordinates (_8: *mut Display, _7: c_ulong, _6: c_ulong, _5: c_int, _4: c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_ulong) -> c_int, pub fn XUndefineCursor (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XUngrabButton (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_ulong) -> c_int, pub fn XUngrabKey (_4: *mut Display, _3: c_int, _2: c_uint, _1: c_ulong) -> c_int, pub fn XUngrabKeyboard (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XUngrabPointer (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XUngrabServer (_1: *mut Display) -> c_int, pub fn XUninstallColormap (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XUnionRectWithRegion (_3: *mut XRectangle, _2: Region, _1: Region) -> c_int, pub fn XUnionRegion (_3: Region, _2: Region, _1: Region) -> c_int, pub fn XUnloadFont (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XUnlockDisplay (_1: *mut Display) -> (), pub fn XUnmapSubwindows (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XUnmapWindow (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XUnregisterIMInstantiateCallback (_6: *mut Display, _5: XrmDatabase, _4: *mut c_char, _3: *mut c_char, _2: Option, _1: *mut c_char) -> c_int, pub fn XUnsetICFocus (_1: XIC) -> (), pub fn Xutf8DrawImageString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (), pub fn Xutf8DrawString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (), pub fn Xutf8DrawText (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XmbTextItem, _1: c_int) -> (), pub fn Xutf8LookupString (_6: XIC, _5: *mut XKeyEvent, _4: *mut c_char, _3: c_int, _2: *mut c_ulong, _1: *mut c_int) -> c_int, pub fn Xutf8ResetIC (_1: XIC) -> *mut c_char, pub fn Xutf8SetWMProperties (_9: *mut Display, _8: c_ulong, _7: *const c_char, _6: *const c_char, _5: *mut *mut c_char, _4: c_int, _3: *mut XSizeHints, _2: *mut XWMHints, _1: *mut XClassHint) -> (), pub fn Xutf8TextEscapement (_3: XFontSet, _2: *const c_char, _1: c_int) -> c_int, pub fn Xutf8TextExtents (_5: XFontSet, _4: *const c_char, _3: c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int, pub fn Xutf8TextListToTextProperty (_5: *mut Display, _4: *mut *mut c_char, _3: c_int, _2: XICCEncodingStyle, _1: *mut XTextProperty) -> c_int, pub fn Xutf8TextPerCharExtents (_9: XFontSet, _8: *const c_char, _7: c_int, _6: *mut XRectangle, _5: *mut XRectangle, _4: c_int, _3: *mut c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int, pub fn Xutf8TextPropertyToTextList (_4: *mut Display, _3: *const XTextProperty, _2: *mut *mut *mut c_char, _1: *mut c_int) -> c_int, pub fn XVendorRelease (_1: *mut Display) -> c_int, pub fn XVisualIDFromVisual (_1: *mut Visual) -> c_ulong, pub fn XWarpPointer (_9: *mut Display, _8: c_ulong, _7: c_ulong, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int, pub fn XwcDrawImageString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const wchar_t, _1: c_int) -> (), pub fn XwcDrawString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const wchar_t, _1: c_int) -> (), pub fn XwcDrawText (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XwcTextItem, _1: c_int) -> (), pub fn XwcFreeStringList (_1: *mut *mut wchar_t) -> (), pub fn XwcLookupString (_6: XIC, _5: *mut XKeyEvent, _4: *mut wchar_t, _3: c_int, _2: *mut c_ulong, _1: *mut c_int) -> c_int, pub fn XwcResetIC (_1: XIC) -> *mut wchar_t, pub fn XwcTextEscapement (_3: XFontSet, _2: *const wchar_t, _1: c_int) -> c_int, pub fn XwcTextExtents (_5: XFontSet, _4: *const wchar_t, _3: c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int, pub fn XwcTextListToTextProperty (_5: *mut Display, _4: *mut *mut wchar_t, _3: c_int, _2: XICCEncodingStyle, _1: *mut XTextProperty) -> c_int, pub fn XwcTextPerCharExtents (_9: XFontSet, _8: *const wchar_t, _7: c_int, _6: *mut XRectangle, _5: *mut XRectangle, _4: c_int, _3: *mut c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int, pub fn XwcTextPropertyToTextList (_4: *mut Display, _3: *const XTextProperty, _2: *mut *mut *mut wchar_t, _1: *mut c_int) -> c_int, pub fn XWhitePixel (_2: *mut Display, _1: c_int) -> c_ulong, pub fn XWhitePixelOfScreen (_1: *mut Screen) -> c_ulong, pub fn XWidthMMOfScreen (_1: *mut Screen) -> c_int, pub fn XWidthOfScreen (_1: *mut Screen) -> c_int, pub fn XWindowEvent (_4: *mut Display, _3: c_ulong, _2: c_long, _1: *mut XEvent) -> c_int, pub fn XWithdrawWindow (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int, pub fn XWMGeometry (_11: *mut Display, _10: c_int, _9: *const c_char, _8: *const c_char, _7: c_uint, _6: *mut XSizeHints, _5: *mut c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XWriteBitmapFile (_7: *mut Display, _6: *const c_char, _5: c_ulong, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int, pub fn XXorRegion (_3: Region, _2: Region, _1: Region) -> c_int, variadic: pub fn XCreateIC (_1: XIM) -> XIC, pub fn XCreateOC (_1: XOM) -> XFontSet, pub fn XGetICValues (_1: XIC) -> *mut c_char, pub fn XGetIMValues (_1: XIM) -> *mut c_char, pub fn XGetOCValues (_1: XFontSet) -> *mut c_char, pub fn XGetOMValues (_1: XOM) -> *mut c_char, pub fn XSetICValues (_1: XIC) -> *mut c_char, pub fn XSetIMValues (_1: XIM) -> *mut c_char, pub fn XSetOCValues (_1: XFontSet) -> *mut c_char, pub fn XSetOMValues (_1: XOM) -> *mut c_char, pub fn XVaCreateNestedList (_1: c_int) -> *mut c_void, globals: } // // types // // common types pub type Atom = XID; pub type Bool = c_int; pub type Colormap = XID; pub type Cursor = XID; pub type Drawable = XID; pub type Font = XID; pub type GContext = XID; pub type KeyCode = c_uchar; pub type KeySym = XID; pub type Mask = c_ulong; pub type Pixmap = XID; pub type Status = Bool; pub type Time = c_ulong; pub type VisualID = XID; pub type Window = XID; pub type XID = c_ulong; pub type XPointer = *mut c_char; // opaque structures pub enum _XDisplay {} pub enum xError {} pub enum xEvent {} pub enum _XGC {} pub enum _XIC {} pub enum _XIM {} pub enum _XRegion {} pub enum _XOC {} pub enum _XOM {} pub enum _XrmHashBucketRec {} // TODO structs #[repr(C)] pub struct _XcmsCCC; #[repr(C)] pub struct XcmsColor; #[repr(C)] pub struct _XcmsColorSpace; #[repr(C)] pub struct _XcmsFunctionSet; #[repr(C)] pub struct _XkbAction; #[repr(C)] pub struct _XkbBounds; #[repr(C)] pub struct _XkbChanges; #[repr(C)] pub struct _XkbClientMapRec; #[repr(C)] pub struct _XkbColor; #[repr(C)] pub struct _XkbComponentList; #[repr(C)] pub struct _XkbComponentNames; #[repr(C)] pub struct _XkbControls; #[repr(C)] pub struct _XkbControlsChanges; #[repr(C)] pub struct _XkbControlsNotify; #[repr(C)] pub struct _XkbDeviceChanges; #[repr(C)] pub struct _XkbDeviceInfo; #[repr(C)] pub struct _XkbDeviceLedInfo; #[repr(C)] pub struct _XkbDoodad; #[repr(C)] pub struct _XkbExtensionDeviceNotify; #[repr(C)] pub struct _XkbGeometry; #[repr(C)] pub struct _XkbGeometrySizes; #[repr(C)] pub struct _XkbIndicatorMapRec; #[repr(C)] pub struct _XkbKey; #[repr(C)] pub struct _XkbKeyType; #[repr(C)] pub struct _XkbMapChanges; #[repr(C)] pub struct _XkbMods; #[repr(C)] pub struct _XkbNameChanges; #[repr(C)] pub struct _XkbNamesNotify; #[repr(C)] pub struct _XkbOutline; #[repr(C)] pub struct _XkbOverlay; #[repr(C)] pub struct _XkbOverlayKey; #[repr(C)] pub struct _XkbOverlayRow; #[repr(C)] pub struct _XkbProperty; #[repr(C)] pub struct _XkbRow; #[repr(C)] pub struct _XkbSection; #[repr(C)] pub struct _XkbServerMapRec; #[repr(C)] pub struct _XkbShape; #[repr(C)] pub struct _XkbSymInterpretRec; // union placeholders pub type XEDataObject = *mut c_void; // misc typedefs pub type Display = _XDisplay; pub type GC = *mut _XGC; pub type Region = *mut _XRegion; pub type XcmsCCC = *mut _XcmsCCC; pub type XcmsColorSpace = _XcmsColorSpace; pub type XcmsFunctionSet = _XcmsFunctionSet; pub type XContext = c_int; pub type XFontSet = *mut _XOC; pub type XIC = *mut _XIC; pub type XIM = *mut _XIM; pub type XkbAction = _XkbAction; pub type XkbBoundsPtr = *mut _XkbBounds; pub type XkbChangesPtr = *mut _XkbChanges; pub type XkbClientMapPtr = *mut _XkbClientMapRec; pub type XkbColorPtr = *mut _XkbColor; pub type XkbCompatMapPtr = *mut _XkbCompatMapRec; pub type XkbComponentListPtr = *mut _XkbComponentList; pub type XkbComponentNamesPtr = *mut _XkbComponentNames; pub type XkbControlsChangesPtr = *mut _XkbControlsChanges; pub type XkbControlsNotifyEvent = _XkbControlsNotify; pub type XkbControlsPtr = *mut _XkbControls; pub type XkbDescPtr = *mut _XkbDesc; pub type XkbDeviceChangesPtr = *mut _XkbDeviceChanges; pub type XkbDeviceInfoPtr = *mut _XkbDeviceInfo; pub type XkbDeviceLedInfoPtr = *mut _XkbDeviceLedInfo; pub type XkbDoodadPtr = *mut _XkbDoodad; pub type XkbExtensionDeviceNotifyEvent = _XkbExtensionDeviceNotify; pub type XkbGeometryPtr = *mut _XkbGeometry; pub type XkbGeometrySizesPtr = *mut _XkbGeometrySizes; pub type XkbIndicatorMapPtr = *mut _XkbIndicatorMapRec; pub type XkbIndicatorMapRec = _XkbIndicatorMapRec; pub type XkbIndicatorPtr = *mut _XkbIndicatorRec; pub type XkbKeyTypePtr = *mut _XkbKeyType; pub type XkbMapChangesPtr = *mut _XkbMapChanges; pub type XkbMapNotifyEvent = _XkbMapNotifyEvent; pub type XkbModsPtr = *mut _XkbMods; pub type XkbModsRec = _XkbMods; pub type XkbNameChangesPtr = *mut _XkbNameChanges; pub type XkbNamesNotifyEvent = _XkbNamesNotify; pub type XkbNamesPtr = *mut _XkbNamesRec; pub type XkbKeyAliasPtr = *mut _XkbKeyAliasRec; pub type XkbKeyNamePtr = *mut _XkbKeyNameRec; pub type XkbKeyPtr = *mut _XkbKey; pub type XkbOutlinePtr = *mut _XkbOutline; pub type XkbOverlayKeyPtr = *mut _XkbOverlayKey; pub type XkbOverlayPtr = *mut _XkbOverlay; pub type XkbOverlayRowPtr = *mut _XkbOverlayRow; pub type XkbPropertyPtr = *mut _XkbProperty; pub type XkbRowPtr = *mut _XkbRow; pub type XkbSectionPtr = *mut _XkbSection; pub type XkbServerMapPtr = *mut _XkbServerMapRec; pub type XkbShapePtr = *mut _XkbShape; pub type XkbStatePtr = *mut _XkbStateRec; pub type XkbSymInterpretPtr = *mut _XkbSymInterpretRec; pub type XOM = *mut _XOM; pub type XrmDatabase = *mut _XrmHashBucketRec; pub type XrmOptionDescList = *mut XrmOptionDescRec; // function pointers pub type XConnectionWatchProc = Option; pub type XIMProc = Option; pub type XICProc = Option Bool>; // C enums pub type XICCEncodingStyle = c_int; pub type XOrientation = c_int; pub type XrmBinding = c_int; pub type XrmOptionKind = c_int; #[allow(dead_code)] #[cfg(test)] #[repr(C)] enum TestEnum { Variant1, Variant2, } #[test] fn enum_size_test () { assert!(::std::mem::size_of::() == ::std::mem::size_of::()); } // // event structures // #[derive(Clone, Copy)] #[repr(C)] pub union XEvent { pub type_: c_int, pub any: XAnyEvent, pub button: XButtonEvent, pub circulate: XCirculateEvent, pub circulate_request: XCirculateRequestEvent, pub client_message: XClientMessageEvent, pub colormap: XColormapEvent, pub configure: XConfigureEvent, pub configure_request: XConfigureRequestEvent, pub create_window: XCreateWindowEvent, pub crossing: XCrossingEvent, pub destroy_window: XDestroyWindowEvent, pub error: XErrorEvent, pub expose: XExposeEvent, pub focus_change: XFocusChangeEvent, pub generic_event_cookie: XGenericEventCookie, pub graphics_expose: XGraphicsExposeEvent, pub gravity: XGravityEvent, pub key: XKeyEvent, pub keymap: XKeymapEvent, pub map: XMapEvent, pub mapping: XMappingEvent, pub map_request: XMapRequestEvent, pub motion: XMotionEvent, pub no_expose: XNoExposeEvent, pub property: XPropertyEvent, pub reparent: XReparentEvent, pub resize_request: XResizeRequestEvent, pub selection_clear: XSelectionClearEvent, pub selection: XSelectionEvent, pub selection_request: XSelectionRequestEvent, pub unmap: XUnmapEvent, pub visibility: XVisibilityEvent, pub pad: [c_long; 24], // xf86vidmode pub xf86vm_notify: xf86vmode::XF86VidModeNotifyEvent, // xrandr pub xrr_screen_change_notify: xrandr::XRRScreenChangeNotifyEvent, pub xrr_notify: xrandr::XRRNotifyEvent, pub xrr_output_change_notify: xrandr::XRROutputChangeNotifyEvent, pub xrr_crtc_change_notify: xrandr::XRRCrtcChangeNotifyEvent, pub xrr_output_property_notify: xrandr::XRROutputPropertyNotifyEvent, pub xrr_provider_change_notify: xrandr::XRRProviderChangeNotifyEvent, pub xrr_provider_property_notify: xrandr::XRRProviderPropertyNotifyEvent, pub xrr_resource_change_notify: xrandr::XRRResourceChangeNotifyEvent, // xscreensaver pub xss_notify: xss::XScreenSaverNotifyEvent, } impl XEvent { pub fn get_type (&self) -> c_int { unsafe { self.type_ } } } impl fmt::Debug for XEvent { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let mut d = f.debug_struct("XEvent"); unsafe { match self.type_ { KeyPress => d.field("key", &self.key), KeyRelease => d.field("key", &self.key), ButtonPress => d.field("button", &self.button), ButtonRelease => d.field("button", &self.button), MotionNotify => d.field("motion", &self.motion), EnterNotify => d.field("crossing", &self.crossing), LeaveNotify => d.field("crossing", &self.crossing), FocusIn => d.field("focus_change", &self.focus_change), FocusOut => d.field("focus_change", &self.focus_change), KeymapNotify => d.field("keymap", &self.keymap), Expose => d.field("expose", &self.expose), GraphicsExpose => d.field("graphics_expose", &self.graphics_expose), NoExpose => d.field("no_expose", &self.no_expose), VisibilityNotify => d.field("visibility", &self.visibility), CreateNotify => d.field("create_window", &self.create_window), DestroyNotify => d.field("destroy_window", &self.destroy_window), UnmapNotify => d.field("unmap", &self.unmap), MapNotify => d.field("map", &self.map), MapRequest => d.field("map_request", &self.map_request), ReparentNotify => d.field("reparent", &self.reparent), ConfigureNotify => d.field("configure", &self.configure), ConfigureRequest => d.field("configure_request", &self.configure_request), GravityNotify => d.field("gravity", &self.gravity), ResizeRequest => d.field("resize_request", &self.resize_request), CirculateNotify => d.field("circulate", &self.circulate), CirculateRequest => d.field("circulate_request", &self.circulate_request), PropertyNotify => d.field("property", &self.property), SelectionClear => d.field("selection_clear", &self.selection_clear), SelectionRequest => d.field("selection_request", &self.selection_request), SelectionNotify => d.field("selection", &self.selection), ColormapNotify => d.field("colormap", &self.colormap), ClientMessage => d.field("client_message", &self.client_message), MappingNotify => d.field("mapping", &self.mapping), GenericEvent => d.field("generic_event_cookie", &self.generic_event_cookie), _ => d.field("any", &self.any), } }.finish() } } macro_rules! event_conversions_and_tests { { $($field:ident: $ty:ty,)* } => { #[test] fn xevent_size_test () { use std::mem::size_of; let xevent_size = size_of::(); $(assert!(xevent_size >= size_of::<$ty>());)* } $( impl AsMut<$ty> for XEvent { fn as_mut (&mut self) -> &mut $ty { unsafe { &mut self.$field } } } impl AsRef<$ty> for XEvent { fn as_ref (&self) -> &$ty { unsafe { &self.$field } } } impl From<$ty> for XEvent { fn from (other: $ty) -> XEvent { XEvent{ $field: other } } } impl<'a> From<&'a $ty> for XEvent { fn from (other: &'a $ty) -> XEvent { XEvent{ $field: other.clone() } } } impl From for $ty { fn from (xevent: XEvent) -> $ty { unsafe { xevent.$field } } } impl<'a> From<&'a XEvent> for $ty { fn from (xevent: &'a XEvent) -> $ty { unsafe { xevent.$field } } } )* }; } event_conversions_and_tests! { any: XAnyEvent, button: XButtonEvent, circulate: XCirculateEvent, circulate_request: XCirculateRequestEvent, client_message: XClientMessageEvent, colormap: XColormapEvent, configure: XConfigureEvent, configure_request: XConfigureRequestEvent, create_window: XCreateWindowEvent, crossing: XCrossingEvent, destroy_window: XDestroyWindowEvent, error: XErrorEvent, expose: XExposeEvent, focus_change: XFocusChangeEvent, generic_event_cookie: XGenericEventCookie, graphics_expose: XGraphicsExposeEvent, gravity: XGravityEvent, key: XKeyEvent, keymap: XKeymapEvent, map: XMapEvent, mapping: XMappingEvent, map_request: XMapRequestEvent, motion: XMotionEvent, no_expose: XNoExposeEvent, property: XPropertyEvent, reparent: XReparentEvent, resize_request: XResizeRequestEvent, selection_clear: XSelectionClearEvent, selection: XSelectionEvent, selection_request: XSelectionRequestEvent, unmap: XUnmapEvent, visibility: XVisibilityEvent, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XAnyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XButtonEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub root: Window, pub subwindow: Window, pub time: Time, pub x: c_int, pub y: c_int, pub x_root: c_int, pub y_root: c_int, pub state: c_uint, pub button: c_uint, pub same_screen: Bool, } pub type XButtonPressedEvent = XButtonEvent; pub type XButtonReleasedEvent = XButtonEvent; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XCirculateEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub event: Window, pub window: Window, pub place: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XCirculateRequestEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub parent: Window, pub window: Window, pub place: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XClientMessageEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub message_type: Atom, pub format: c_int, pub data: ClientMessageData, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XColormapEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub colormap: Colormap, pub new: Bool, pub state: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XConfigureEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub event: Window, pub window: Window, pub x: c_int, pub y: c_int, pub width: c_int, pub height: c_int, pub border_width: c_int, pub above: Window, pub override_redirect: Bool, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XConfigureRequestEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub parent: Window, pub window: Window, pub x: c_int, pub y: c_int, pub width: c_int, pub height: c_int, pub border_width: c_int, pub above: Window, pub detail: c_int, pub value_mask: c_ulong, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XCreateWindowEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub parent: Window, pub window: Window, pub x: c_int, pub y: c_int, pub width: c_int, pub height: c_int, pub border_width: c_int, pub override_redirect: Bool, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XCrossingEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub root: Window, pub subwindow: Window, pub time: Time, pub x: c_int, pub y: c_int, pub x_root: c_int, pub y_root: c_int, pub mode: c_int, pub detail: c_int, pub same_screen: Bool, pub focus: Bool, pub state: c_uint, } pub type XEnterWindowEvent = XCrossingEvent; pub type XLeaveWindowEvent = XCrossingEvent; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XDestroyWindowEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub event: Window, pub window: Window, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XErrorEvent { pub type_: c_int, pub display: *mut Display, pub resourceid: XID, pub serial: c_ulong, pub error_code: c_uchar, pub request_code: c_uchar, pub minor_code: c_uchar, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XExposeEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub x: c_int, pub y: c_int, pub width: c_int, pub height: c_int, pub count: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XFocusChangeEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub mode: c_int, pub detail: c_int, } pub type XFocusInEvent = XFocusChangeEvent; pub type XFocusOutEvent = XFocusChangeEvent; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XGraphicsExposeEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub drawable: Drawable, pub x: c_int, pub y: c_int, pub width: c_int, pub height: c_int, pub count: c_int, pub major_code: c_int, pub minor_code: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XGravityEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub event: Window, pub window: Window, pub x: c_int, pub y: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XKeyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub root: Window, pub subwindow: Window, pub time: Time, pub x: c_int, pub y: c_int, pub x_root: c_int, pub y_root: c_int, pub state: c_uint, pub keycode: c_uint, pub same_screen: Bool, } pub type XKeyPressedEvent = XKeyEvent; pub type XKeyReleasedEvent = XKeyEvent; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XKeymapEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub key_vector: [c_char; 32], } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XMapEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub event: Window, pub window: Window, pub override_redirect: Bool, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XMappingEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub event: Window, pub request: c_int, pub first_keycode: c_int, pub count: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XMapRequestEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub parent: Window, pub window: Window, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XMotionEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub root: Window, pub subwindow: Window, pub time: Time, pub x: c_int, pub y: c_int, pub x_root: c_int, pub y_root: c_int, pub state: c_uint, pub is_hint: c_char, pub same_screen: Bool, } pub type XPointerMovedEvent = XMotionEvent; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XNoExposeEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub drawable: Drawable, pub major_code: c_int, pub minor_code: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XPropertyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub atom: Atom, pub time: Time, pub state: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XReparentEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub event: Window, pub window: Window, pub parent: Window, pub x: c_int, pub y: c_int, pub override_redirect: Bool, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XResizeRequestEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub width: c_int, pub height: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XSelectionClearEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub selection: Atom, pub time: Time, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XSelectionEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub requestor: Window, pub selection: Atom, pub target: Atom, pub property: Atom, pub time: Time, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XSelectionRequestEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub owner: Window, pub requestor: Window, pub selection: Atom, pub target: Atom, pub property: Atom, pub time: Time, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XUnmapEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub event: Window, pub window: Window, pub from_configure: Bool, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XVisibilityEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub state: c_int, } // // Xkb structs // #[repr(C)] pub struct _XkbCompatMapRec { pub sym_interpret: XkbSymInterpretPtr, pub groups: [XkbModsRec; XkbNumKbdGroups], pub num_si: c_ushort, pub size_si: c_ushort, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XkbDesc { pub dpy: *mut Display, pub flags: c_ushort, pub device_spec: c_ushort, pub min_key_code: KeyCode, pub max_key_code: KeyCode, pub ctrls: XkbControlsPtr, pub server: XkbServerMapPtr, pub map: XkbClientMapPtr, pub indicators: XkbIndicatorPtr, pub names: XkbNamesPtr, pub compat: XkbCompatMapPtr, pub geom: XkbGeometryPtr, } #[repr(C)] pub struct _XkbIndicatorRec { pub phys_indicators: c_ulong, pub maps: [XkbIndicatorMapRec; XkbNumIndicators], } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XkbKeyAliasRec { pub real: [c_char; XkbKeyNameLength], pub alias: [c_char; XkbKeyNameLength], } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XkbKeyNameRec { pub name: [c_char; XkbKeyNameLength], } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XkbNamesRec { pub keycodes: Atom, pub geometry: Atom, pub symbols: Atom, pub types: Atom, pub compat: Atom, pub vmods: [Atom; XkbNumVirtualMods], pub indicators: [Atom; XkbNumIndicators], pub groups: [Atom; XkbNumKbdGroups], pub keys: XkbKeyNamePtr, pub key_aliases: XkbKeyAliasPtr, pub radio_groups: *mut Atom, pub phys_symbols: Atom, pub num_keys: c_uchar, pub num_key_aliases: c_uchar, pub num_rg: c_ushort, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XkbStateRec { pub group: c_uchar, pub locked_group: c_uchar, pub base_group: c_ushort, pub latched_group: c_ushort, pub mods: c_uchar, pub base_mods: c_uchar, pub latched_mods: c_uchar, pub locked_mods: c_uchar, pub compat_state: c_uchar, pub grab_mods: c_uchar, pub compat_grab_mods: c_uchar, pub lookup_mods: c_uchar, pub compat_lookup_mods: c_uchar, pub ptr_buttons: c_ushort, } // // Xkb event structs // #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XkbAnyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub time: Time, pub xkb_type: c_int, pub device: c_uint, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XkbNewKeyboardNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub time: Time, pub xkb_type: c_int, pub device: c_int, pub old_device: c_int, pub min_key_code: c_int, pub max_key_code: c_int, pub old_min_key_code: c_int, pub old_max_key_code: c_int, pub changed: c_uint, pub req_major: c_char, pub req_minor: c_char, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XkbMapNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub time: Time, pub xkb_type: c_int, pub device: c_int, pub changed: c_uint, pub flags: c_uint, pub first_type: c_int, pub num_types: c_int, pub min_key_code: KeyCode, pub max_key_code: KeyCode, pub first_key_sym: KeyCode, pub first_key_act: KeyCode, pub first_key_bahavior: KeyCode, pub first_key_explicit: KeyCode, pub first_modmap_key: KeyCode, pub first_vmodmap_key: KeyCode, pub num_key_syms: c_int, pub num_key_acts: c_int, pub num_key_behaviors: c_int, pub num_key_explicit: c_int, pub num_modmap_keys: c_int, pub num_vmodmap_keys: c_int, pub vmods: c_uint, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XkbStateNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub time: Time, pub xkb_type: c_int, pub device: c_int, pub changed: c_uint, pub group: c_int, pub base_group: c_int, pub latched_group: c_int, pub locked_group: c_int, pub mods: c_uint, pub base_mods: c_uint, pub latched_mods: c_uint, pub locked_mods: c_uint, pub compat_state: c_int, pub grab_mods: c_uchar, pub compat_grab_mods: c_uchar, pub lookup_mods: c_uchar, pub compat_lookup_mods: c_uchar, pub ptr_buttons: c_int, pub keycode: KeyCode, pub event_type: c_char, pub req_major: c_char, pub req_minor: c_char, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XkbControlsNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub time: Time, pub xkb_type: c_int, pub device: c_int, pub changed_ctrls: c_uint, pub enabled_ctrls: c_uint, pub enabled_ctrl_changes: c_uint, pub num_groups: c_int, pub keycode: KeyCode, pub event_type: c_char, pub req_major: c_char, pub req_minor: c_char, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XkbIndicatorNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub time: Time, pub xkb_type: c_int, pub device: c_int, pub changed: c_uint, pub state: c_uint, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XkbNamesNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub time: Time, pub xkb_type: c_int, pub device: c_int, pub changed: c_uint, pub first_type: c_int, pub num_types: c_int, pub first_lvl: c_int, pub num_lvls: c_int, pub num_aliases: c_int, pub num_radio_groups: c_int, pub changed_vmods: c_uint, pub changed_groups: c_uint, pub changed_indicators: c_uint, pub first_key: c_int, pub num_keys: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XkbCompatMapNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub time: Time, pub xkb_type: c_int, pub device: c_int, pub changed_groups: c_uint, pub first_si: c_int, pub num_si: c_int, pub num_total_si: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XkbBellNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub time: Time, pub xkb_type: c_int, pub device: c_int, pub percent: c_int, pub pitch: c_int, pub duration: c_int, pub bell_class: c_int, pub bell_id: c_int, pub name: Atom, pub window: Window, pub event_only: Bool, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XkbActionMessageEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub time: Time, pub xkb_type: c_int, pub device: c_int, pub keycode: KeyCode, pub press: Bool, pub key_event_follows: Bool, pub group: c_int, pub mods: c_uint, pub message: [c_char; XkbActionMessageLength + 1], } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XkbAccessXNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub time: Time, pub xkb_type: c_int, pub device: c_int, pub detail: c_int, pub keycode: c_int, pub sk_delay: c_int, pub debounce_delay: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XkbExtensionDeviceNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub time: Time, pub xkb_type: c_int, pub device: c_int, pub reason: c_uint, pub supported: c_uint, pub unsupported: c_uint, pub first_btn: c_int, pub num_btns: c_int, pub leds_defined: c_uint, pub led_state: c_uint, pub led_class: c_int, pub led_id: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XkbEvent { _pad: [c_long; 24], } #[cfg(test)] macro_rules! test_xkb_event_size { { $($ty:ty,)* } => { $( assert!(::std::mem::size_of::() >= ::std::mem::size_of::<$ty>()); )* }; } #[test] fn xkb_event_size_test () { test_xkb_event_size! { XkbAnyEvent, XkbNewKeyboardNotifyEvent, XkbMapNotifyEvent, XkbStateNotifyEvent, XkbControlsNotifyEvent, XkbIndicatorNotifyEvent, XkbNamesNotifyEvent, XkbCompatMapNotifyEvent, XkbBellNotifyEvent, XkbActionMessageEvent, XkbAccessXNotifyEvent, XkbExtensionDeviceNotifyEvent, } } pub enum XkbKbdDpyStateRec {} pub type XkbKbdDpyStatePtr = *mut XkbKbdDpyStateRec; // // other structures // #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct Depth { pub depth: c_int, pub nvisuals: c_int, pub visuals: *mut Visual, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct Screen { pub ext_data: *mut XExtData, pub display: *mut Display, pub root: Window, pub width: c_int, pub height: c_int, pub mwidth: c_int, pub mheight: c_int, pub ndepths: c_int, pub depths: *mut Depth, pub root_depth: c_int, pub root_visual: *mut Visual, pub default_gc: GC, pub cmap: Colormap, pub white_pixel: c_ulong, pub black_pixel: c_ulong, pub max_maps: c_int, pub min_maps: c_int, pub backing_store: c_int, pub save_unders: Bool, pub root_input_mask: c_long, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct ScreenFormat { pub ext_data: *mut XExtData, pub depth: c_int, pub bits_per_pixel: c_int, pub scanline_pad: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct Visual { pub ext_data: *mut XExtData, pub visualid: VisualID, pub class: c_int, pub red_mask: c_ulong, pub green_mask: c_ulong, pub blue_mask: c_ulong, pub bits_per_rgb: c_int, pub map_entries: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XArc { pub x: c_short, pub y: c_short, pub width: c_ushort, pub height: c_ushort, pub angle1: c_short, pub angle2: c_short, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XChar2b { pub byte1: c_uchar, pub byte2: c_uchar, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XCharStruct { pub lbearing: c_short, pub rbearing: c_short, pub width: c_short, pub ascent: c_short, pub descent: c_short, pub attributes: c_ushort, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XClassHint { pub res_name: *mut c_char, pub res_class: *mut c_char, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XColor { pub pixel: c_ulong, pub red: c_ushort, pub green: c_ushort, pub blue: c_ushort, pub flags: c_char, pub pad: c_char, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XComposeStatus { pub compose_ptr: XPointer, pub chars_matched: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XExtCodes { pub extension: c_int, pub major_opcode: c_int, pub first_event: c_int, pub first_error: c_int, } #[repr(C)] pub struct XExtData { pub number: c_int, pub next: *mut XExtData, pub free_private: Option c_int>, pub private_data: XPointer, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XFontProp { pub name: Atom, pub card32: c_ulong, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XFontSetExtents { pub max_ink_extent: XRectangle, pub max_logical_extent: XRectangle, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XFontStruct { pub ext_data: *mut XExtData, pub fid: Font, pub direction: c_uint, pub min_char_or_byte2: c_uint, pub max_char_or_byte2: c_uint, pub min_byte1: c_uint, pub max_byte1: c_uint, pub all_chars_exist: Bool, pub default_char: c_uint, pub n_properties: c_int, pub properties: *mut XFontProp, pub min_bounds: XCharStruct, pub max_bounds: XCharStruct, pub per_char: *mut XCharStruct, pub ascent: c_int, pub descent: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XGCValues { pub function: c_int, pub plane_mask: c_ulong, pub foreground: c_ulong, pub background: c_ulong, pub line_width: c_int, pub line_style: c_int, pub cap_style: c_int, pub join_style: c_int, pub fill_style: c_int, pub fill_rule: c_int, pub arc_mode: c_int, pub tile: Pixmap, pub stipple: Pixmap, pub ts_x_origin: c_int, pub ts_y_origin: c_int, pub font: Font, pub subwindow_mode: c_int, pub graphics_exposures: Bool, pub clip_x_origin: c_int, pub clip_y_origin: c_int, pub clip_mask: Pixmap, pub dash_offset: c_int, pub dashes: c_char, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XGenericEventCookie { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub extension: c_int, pub evtype: c_int, pub cookie: c_uint, pub data: *mut c_void, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XHostAddress { pub family: c_int, pub length: c_int, pub address: *mut c_char, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XIconSize { pub min_width: c_int, pub min_height: c_int, pub max_width: c_int, pub max_height: c_int, pub width_inc: c_int, pub height_inc: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XImage { pub width: c_int, pub height: c_int, pub xoffset: c_int, pub format: c_int, pub data: *mut c_char, pub byte_order: c_int, pub bitmap_unit: c_int, pub bitmap_bit_order: c_int, pub bitmap_pad: c_int, pub depth: c_int, pub bytes_per_line: c_int, pub bits_per_pixel: c_int, pub red_mask: c_ulong, pub green_mask: c_ulong, pub blue_mask: c_ulong, pub obdata: XPointer, pub funcs: ImageFns, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XKeyboardControl { pub key_click_percent: c_int, pub bell_percent: c_int, pub bell_pitch: c_int, pub bell_duration: c_int, pub led: c_int, pub led_mode: c_int, pub key: c_int, pub auto_repeat_mode: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XKeyboardState { pub key_click_percent: c_int, pub bell_percent: c_int, pub bell_pitch: c_uint, pub bell_duration: c_uint, pub led_mask: c_ulong, pub global_auto_repeat: c_int, pub auto_repeats: [c_char; 32], } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XmbTextItem { pub chars: *mut c_char, pub nchars: c_int, pub delta: c_int, pub font_set: XFontSet, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XModifierKeymap { pub max_keypermod: c_int, pub modifiermap: *mut KeyCode, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XOMCharSetList { pub charset_count: c_int, pub charset_list: *mut *mut c_char, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XPixmapFormatValues { pub depth: c_int, pub bits_per_pixel: c_int, pub scanline_pad: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XPoint { pub x: c_short, pub y: c_short, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRectangle { pub x: c_short, pub y: c_short, pub width: c_ushort, pub height: c_ushort, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XrmOptionDescRec { pub option: *mut c_char, pub specifier: *mut c_char, pub argKind: XrmOptionKind, pub value: XPointer, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XrmValue { pub size: c_uint, pub addr: XPointer, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XSegment { pub x1: c_short, pub y1: c_short, pub x2: c_short, pub y2: c_short, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XSetWindowAttributes { pub background_pixmap: Pixmap, pub background_pixel: c_ulong, pub border_pixmap: Pixmap, pub border_pixel: c_ulong, pub bit_gravity: c_int, pub win_gravity: c_int, pub backing_store: c_int, pub backing_planes: c_ulong, pub backing_pixel: c_ulong, pub save_under: Bool, pub event_mask: c_long, pub do_not_propagate_mask: c_long, pub override_redirect: Bool, pub colormap: Colormap, pub cursor: Cursor, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XSizeHints { pub flags: c_long, pub x: c_int, pub y: c_int, pub width: c_int, pub height: c_int, pub min_width: c_int, pub min_height: c_int, pub max_width: c_int, pub max_height: c_int, pub width_inc: c_int, pub height_inc: c_int, pub min_aspect: AspectRatio, pub max_aspect: AspectRatio, pub base_width: c_int, pub base_height: c_int, pub win_gravity: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XStandardColormap { pub colormap: Colormap, pub red_max: c_ulong, pub red_mult: c_ulong, pub green_max: c_ulong, pub green_mult: c_ulong, pub blue_max: c_ulong, pub blue_mult: c_ulong, pub base_pixel: c_ulong, pub visualid: VisualID, pub killid: XID, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XTextItem { pub chars: *mut c_char, pub nchars: c_int, pub delta: c_int, pub font: Font, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XTextItem16 { pub chars: *mut XChar2b, pub nchars: c_int, pub delta: c_int, pub font: Font, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XTextProperty { pub value: *mut c_uchar, pub encoding: Atom, pub format: c_int, pub nitems: c_ulong, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XTimeCoord { pub time: Time, pub x: c_short, pub y: c_short, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XVisualInfo { pub visual: *mut Visual, pub visualid: VisualID, pub screen: c_int, pub depth: c_int, pub class: c_int, pub red_mask: c_ulong, pub green_mask: c_ulong, pub blue_mask: c_ulong, pub colormap_size: c_int, pub bits_per_rgb: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XwcTextItem { pub chars: *mut wchar_t, pub nchars: c_int, pub delta: c_int, pub font_set: XFontSet, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XWindowAttributes { pub x: c_int, pub y: c_int, pub width: c_int, pub height: c_int, pub border_width: c_int, pub depth: c_int, pub visual: *mut Visual, pub root: Window, pub class: c_int, pub bit_gravity: c_int, pub win_gravity: c_int, pub backing_store: c_int, pub backing_planes: c_ulong, pub backing_pixel: c_ulong, pub save_under: Bool, pub colormap: Colormap, pub map_installed: Bool, pub map_state: c_int, pub all_event_masks: c_long, pub your_event_mask: c_long, pub do_not_propagate_mask: c_long, pub override_redirect: Bool, pub screen: *mut Screen, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XWindowChanges { pub x: c_int, pub y: c_int, pub width: c_int, pub height: c_int, pub border_width: c_int, pub sibling: Window, pub stack_mode: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XWMHints { pub flags: c_long, pub input: Bool, pub initial_state: c_int, pub icon_pixmap: Pixmap, pub icon_window: Window, pub icon_x: c_int, pub icon_y: c_int, pub icon_mask: Pixmap, pub window_group: XID, } #[repr(C)] pub struct XIMCallback { pub client_data: XPointer, pub callback: XIMProc, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub enum XIMCaretDirection { XIMForwardChar, XIMBackwardChar, XIMForwardWord, XIMBackwardWord, XIMCaretUp, XIMCaretDown, XIMNextLine, XIMPreviousLine, XIMLineStart, XIMLineEnd, XIMAbsolutePosition, XIMDontChange, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub enum XIMCaretStyle { XIMIsInvisible, XIMIsPrimary, XIMIsSecondary, } pub type XIMFeedback = c_ulong; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XIMPreeditDrawCallbackStruct { pub caret: c_int, pub chg_first: c_int, pub chg_length: c_int, pub text: *mut XIMText, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XIMPreeditCaretCallbackStruct { pub position: c_int, pub direction: XIMCaretDirection, pub style: XIMCaretStyle, } #[derive(Clone, Copy)] #[repr(C)] pub union XIMTextString { pub multi_byte: *mut c_char, pub wide_char: wchar_t, } #[derive(Clone, Copy)] #[repr(C)] pub struct XIMText { pub length: c_ushort, pub feedback: *mut XIMFeedback, pub encoding_is_wchar: Bool, pub string: XIMTextString, } #[repr(C)] pub struct XICCallback { pub client_data: XPointer, pub callback: XICProc, } // // anonymous structures // #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct AspectRatio { pub x: c_int, pub y: c_int, } #[derive(Debug, Clone, Copy, Default, PartialEq)] #[repr(C)] pub struct ClientMessageData { longs: [c_long; 5], } impl ClientMessageData { pub fn as_bytes (&self) -> &[c_char] { self.as_ref() } pub fn as_bytes_mut (&mut self) -> &mut [c_char] { self.as_mut() } pub fn as_longs (&self) -> &[c_long] { self.as_ref() } pub fn as_longs_mut (&mut self) -> &mut [c_long] { self.as_mut() } pub fn as_shorts (&self) -> &[c_short] { self.as_ref() } pub fn as_shorts_mut (&mut self) -> &mut [c_short] { self.as_mut() } pub fn get_byte (&self, index: usize) -> c_char { self.as_bytes()[index] } pub fn get_long (&self, index: usize) -> c_long { self.longs[index] } pub fn get_short (&self, index: usize) -> c_short { self.as_shorts()[index] } pub fn new() -> ClientMessageData { ClientMessageData { longs: [0; 5] } } pub fn set_byte (&mut self, index: usize, value: c_char) { self.as_bytes_mut()[index] = value; } pub fn set_long (&mut self, index: usize, value: c_long) { self.longs[index] = value; } pub fn set_short (&mut self, index: usize, value: c_short) { self.as_shorts_mut()[index] = value; } } macro_rules! client_message_data_conversions { { $($ty:ty[$n:expr],)* } => { $( impl AsMut<[$ty]> for ClientMessageData { fn as_mut (&mut self) -> &mut [$ty] { unsafe { slice::from_raw_parts_mut(self.longs.as_mut_ptr() as *mut $ty, $n) } } } impl AsRef<[$ty]> for ClientMessageData { fn as_ref (&self) -> &[$ty] { unsafe { slice::from_raw_parts(self.longs.as_ptr() as *mut $ty, $n) } } } impl From<[$ty; $n]> for ClientMessageData { fn from (array: [$ty; $n]) -> ClientMessageData { unsafe { transmute_union(&array) } } } )* }; } client_message_data_conversions! { c_schar[20], c_uchar[20], c_short[10], c_ushort[10], c_long[5], c_ulong[5], } #[test] fn client_message_size_test () { assert!(::std::mem::size_of::() >= ::std::mem::size_of::<[c_char; 20]>()); assert!(::std::mem::size_of::() >= ::std::mem::size_of::<[c_short; 10]>()); } #[derive(Debug, Copy)] #[repr(C)] pub struct ImageFns { pub create_image: Option *mut XImage>, pub destroy_image: Option c_int>, pub get_pixel: Option c_ulong>, pub put_pixel: Option c_int>, pub sub_image: Option *mut XImage>, pub add_pixel: Option c_int>, } impl Clone for ImageFns { fn clone (&self) -> ImageFns { *self } } impl PartialEq for ImageFns { fn eq (&self, rhs: &ImageFns) -> bool { unsafe { mem_eq(self, rhs) } } } // // constants // // allocate colormap pub const AllocNone: c_int = 0; pub const AllocAll: c_int = 1; // array sizes pub const XkbKeyNameLength: usize = 4; pub const XkbNumIndicators: usize = 32; pub const XkbNumKbdGroups: usize = 4; pub const XkbNumVirtualMods: usize = 16; // atoms pub const XA_PRIMARY: Atom = 1; pub const XA_SECONDARY: Atom = 2; pub const XA_ARC: Atom = 3; pub const XA_ATOM: Atom = 4; pub const XA_BITMAP: Atom = 5; pub const XA_CARDINAL: Atom = 6; pub const XA_COLORMAP: Atom = 7; pub const XA_CURSOR: Atom = 8; pub const XA_CUT_BUFFER0: Atom = 9; pub const XA_CUT_BUFFER1: Atom = 10; pub const XA_CUT_BUFFER2: Atom = 11; pub const XA_CUT_BUFFER3: Atom = 12; pub const XA_CUT_BUFFER4: Atom = 13; pub const XA_CUT_BUFFER5: Atom = 14; pub const XA_CUT_BUFFER6: Atom = 15; pub const XA_CUT_BUFFER7: Atom = 16; pub const XA_DRAWABLE: Atom = 17; pub const XA_FONT: Atom = 18; pub const XA_INTEGER: Atom = 19; pub const XA_PIXMAP: Atom = 20; pub const XA_POINT: Atom = 21; pub const XA_RECTANGLE: Atom = 22; pub const XA_RESOURCE_MANAGER: Atom = 23; pub const XA_RGB_COLOR_MAP: Atom = 24; pub const XA_RGB_BEST_MAP: Atom = 25; pub const XA_RGB_BLUE_MAP: Atom = 26; pub const XA_RGB_DEFAULT_MAP: Atom = 27; pub const XA_RGB_GRAY_MAP: Atom = 28; pub const XA_RGB_GREEN_MAP: Atom = 29; pub const XA_RGB_RED_MAP: Atom = 30; pub const XA_STRING: Atom = 31; pub const XA_VISUALID: Atom = 32; pub const XA_WINDOW: Atom = 33; pub const XA_WM_COMMAND: Atom = 34; pub const XA_WM_HINTS: Atom = 35; pub const XA_WM_CLIENT_MACHINE: Atom = 36; pub const XA_WM_ICON_NAME: Atom = 37; pub const XA_WM_ICON_SIZE: Atom = 38; pub const XA_WM_NAME: Atom = 39; pub const XA_WM_NORMAL_HINTS: Atom = 40; pub const XA_WM_SIZE_HINTS: Atom = 41; pub const XA_WM_ZOOM_HINTS: Atom = 42; pub const XA_MIN_SPACE: Atom = 43; pub const XA_NORM_SPACE: Atom = 44; pub const XA_MAX_SPACE: Atom = 45; pub const XA_END_SPACE: Atom = 46; pub const XA_SUPERSCRIPT_X: Atom = 47; pub const XA_SUPERSCRIPT_Y: Atom = 48; pub const XA_SUBSCRIPT_X: Atom = 49; pub const XA_SUBSCRIPT_Y: Atom = 50; pub const XA_UNDERLINE_POSITION: Atom = 51; pub const XA_UNDERLINE_THICKNESS: Atom = 52; pub const XA_STRIKEOUT_ASCENT: Atom = 53; pub const XA_STRIKEOUT_DESCENT: Atom = 54; pub const XA_ITALIC_ANGLE: Atom = 55; pub const XA_X_HEIGHT: Atom = 56; pub const XA_QUAD_WIDTH: Atom = 57; pub const XA_WEIGHT: Atom = 58; pub const XA_POINT_SIZE: Atom = 59; pub const XA_RESOLUTION: Atom = 60; pub const XA_COPYRIGHT: Atom = 61; pub const XA_NOTICE: Atom = 62; pub const XA_FONT_NAME: Atom = 63; pub const XA_FAMILY_NAME: Atom = 64; pub const XA_FULL_NAME: Atom = 65; pub const XA_CAP_HEIGHT: Atom = 66; pub const XA_WM_CLASS: Atom = 67; pub const XA_WM_TRANSIENT_FOR: Atom = 68; // boolean values pub const False: Bool = 0; pub const True: Bool = 1; // clip rect ordering pub const Unsorted: c_int = 0; pub const YSorted: c_int = 1; pub const YXSorted: c_int = 2; pub const YXBanded: c_int = 3; // color component mask pub const DoRed: c_char = 1; pub const DoGreen: c_char = 2; pub const DoBlue: c_char = 4; // error codes pub const Success: c_uchar = 0; pub const BadRequest: c_uchar = 1; pub const BadValue: c_uchar = 2; pub const BadWindow: c_uchar = 3; pub const BadPixmap: c_uchar = 4; pub const BadAtom: c_uchar = 5; pub const BadCursor: c_uchar = 6; pub const BadFont: c_uchar = 7; pub const BadMatch: c_uchar = 8; pub const BadDrawable: c_uchar = 9; pub const BadAccess: c_uchar = 10; pub const BadAlloc: c_uchar = 11; pub const BadColor: c_uchar = 12; pub const BadGC: c_uchar = 13; pub const BadIDChoice: c_uchar = 14; pub const BadName: c_uchar = 15; pub const BadLength: c_uchar = 16; pub const BadImplementation: c_uchar = 17; pub const FirstExtensionError: c_uchar = 128; pub const LastExtensionError: c_uchar = 255; // event kinds pub const KeyPress: c_int = 2; pub const KeyRelease: c_int = 3; pub const ButtonPress: c_int = 4; pub const ButtonRelease: c_int = 5; pub const MotionNotify: c_int = 6; pub const EnterNotify: c_int = 7; pub const LeaveNotify: c_int = 8; pub const FocusIn: c_int = 9; pub const FocusOut: c_int = 10; pub const KeymapNotify: c_int = 11; pub const Expose: c_int = 12; pub const GraphicsExpose: c_int = 13; pub const NoExpose: c_int = 14; pub const VisibilityNotify: c_int = 15; pub const CreateNotify: c_int = 16; pub const DestroyNotify: c_int = 17; pub const UnmapNotify: c_int = 18; pub const MapNotify: c_int = 19; pub const MapRequest: c_int = 20; pub const ReparentNotify: c_int = 21; pub const ConfigureNotify: c_int = 22; pub const ConfigureRequest: c_int = 23; pub const GravityNotify: c_int = 24; pub const ResizeRequest: c_int = 25; pub const CirculateNotify: c_int = 26; pub const CirculateRequest: c_int = 27; pub const PropertyNotify: c_int = 28; pub const SelectionClear: c_int = 29; pub const SelectionRequest: c_int = 30; pub const SelectionNotify: c_int = 31; pub const ColormapNotify: c_int = 32; pub const ClientMessage: c_int = 33; pub const MappingNotify: c_int = 34; pub const GenericEvent: c_int = 35; pub const LASTEvent: c_int = 36; // event mask pub const NoEventMask: c_long = 0; pub const KeyPressMask: c_long = 0x0000_0001; pub const KeyReleaseMask: c_long = 0x0000_0002; pub const ButtonPressMask: c_long = 0x0000_0004; pub const ButtonReleaseMask: c_long = 0x0000_0008; pub const EnterWindowMask: c_long = 0x0000_0010; pub const LeaveWindowMask: c_long = 0x0000_0020; pub const PointerMotionMask: c_long = 0x0000_0040; pub const PointerMotionHintMask: c_long = 0x0000_0080; pub const Button1MotionMask: c_long = 0x0000_0100; pub const Button2MotionMask: c_long = 0x0000_0200; pub const Button3MotionMask: c_long = 0x0000_0400; pub const Button4MotionMask: c_long = 0x0000_0800; pub const Button5MotionMask: c_long = 0x0000_1000; pub const ButtonMotionMask: c_long = 0x0000_2000; pub const KeymapStateMask: c_long = 0x0000_4000; pub const ExposureMask: c_long = 0x0000_8000; pub const VisibilityChangeMask: c_long = 0x0001_0000; pub const StructureNotifyMask: c_long = 0x0002_0000; pub const ResizeRedirectMask: c_long = 0x0004_0000; pub const SubstructureNotifyMask: c_long = 0x0008_0000; pub const SubstructureRedirectMask: c_long = 0x0010_0000; pub const FocusChangeMask: c_long = 0x0020_0000; pub const PropertyChangeMask: c_long = 0x0040_0000; pub const ColormapChangeMask: c_long = 0x0080_0000; pub const OwnerGrabButtonMask: c_long = 0x0100_0000; // property modes pub const PropModeReplace: c_int = 0; pub const PropModePrepend: c_int = 1; pub const PropModeAppend: c_int = 2; // modifier names pub const ShiftMapIndex: c_int = 0; pub const LockMapIndex: c_int = 1; pub const ControlMapIndex: c_int = 2; pub const Mod1MapIndex: c_int = 3; pub const Mod2MapIndex: c_int = 4; pub const Mod3MapIndex: c_int = 5; pub const Mod4MapIndex: c_int = 6; pub const Mod5MapIndex: c_int = 7; // button masks pub const Button1Mask: c_uint = (1<<8); pub const Button2Mask: c_uint = (1<<9); pub const Button3Mask: c_uint = (1<<10); pub const Button4Mask: c_uint = (1<<11); pub const Button5Mask: c_uint = (1<<12); pub const AnyModifier: c_uint = (1<<15); // Notify modes pub const NotifyNormal: c_int = 0; pub const NotifyGrab: c_int = 1; pub const NotifyUngrab: c_int = 2; pub const NotifyWhileGrabbed: c_int = 3; pub const NotifyHint: c_int = 1; // Notify detail pub const NotifyAncestor: c_int = 0; pub const NotifyVirtual: c_int = 1; pub const NotifyInferior: c_int = 2; pub const NotifyNonlinear: c_int = 3; pub const NotifyNonlinearVirtual: c_int = 4; pub const NotifyPointer: c_int = 5; pub const NotifyPointerRoot: c_int = 6; pub const NotifyDetailNone: c_int = 7; // Visibility notify pub const VisibilityUnobscured: c_int = 0; pub const VisibilityPartiallyObscured: c_int = 1; pub const VisibilityFullyObscured: c_int = 2; // Circulation request pub const PlaceOnTop: c_int = 0; pub const PlaceOnBottom: c_int = 1; // protocol families pub const FamilyInternet: c_int = 0; pub const FamilyDECnet: c_int = 1; pub const FamilyChaos: c_int = 2; pub const FamilyInternet6: c_int = 6; // authentication families not tied to a specific protocol pub const FamilyServerInterpreted: c_int = 5; // property notification pub const PropertyNewValue: c_int = 0; pub const PropertyDelete: c_int = 1; // Color Map notification pub const ColormapUninstalled: c_int = 0; pub const ColormapInstalled: c_int = 1; // grab modes pub const GrabModeSync: c_int = 0; pub const GrabModeAsync: c_int = 1; // grab status pub const GrabSuccess: c_int = 0; pub const AlreadyGrabbed: c_int = 1; pub const GrabInvalidTime: c_int = 2; pub const GrabNotViewable: c_int = 3; pub const GrabFrozen: c_int = 4; // AllowEvents modes pub const AsyncPointer: c_int = 0; pub const SyncPointer: c_int = 1; pub const ReplayPointer: c_int = 2; pub const AsyncKeyboard: c_int = 3; pub const SyncKeyboard: c_int = 4; pub const ReplayKeyboard: c_int = 5; pub const AsyncBoth: c_int = 6; pub const SyncBoth: c_int = 7; // Used in SetInputFocus, GetInputFocus pub const RevertToNone: c_int = 0; pub const RevertToPointerRoot: c_int = 1; pub const RevertToParent: c_int = 2; // ConfigureWindow structure pub const CWX: c_ushort = (1<<0); pub const CWY: c_ushort = (1<<1); pub const CWWidth: c_ushort = (1<<2); pub const CWHeight: c_ushort = (1<<3); pub const CWBorderWidth: c_ushort = (1<<4); pub const CWSibling: c_ushort = (1<<5); pub const CWStackMode: c_ushort = (1<<6); // gravity pub const ForgetGravity: c_int = 0; pub const UnmapGravity: c_int = 0; pub const NorthWestGravity: c_int = 1; pub const NorthGravity: c_int = 2; pub const NorthEastGravity: c_int = 3; pub const WestGravity: c_int = 4; pub const CenterGravity: c_int = 5; pub const EastGravity: c_int = 6; pub const SouthWestGravity: c_int = 7; pub const SouthGravity: c_int = 8; pub const SouthEastGravity: c_int = 9; pub const StaticGravity: c_int = 10; // image format pub const XYBitmap: c_int = 0; pub const XYPixmap: c_int = 1; pub const ZPixmap: c_int = 2; // Used in CreateWindow for backing-store hint pub const NotUseful: c_int = 0; pub const WhenMapped: c_int = 1; pub const Always: c_int = 2; // map state pub const IsUnmapped: c_int = 0; pub const IsUnviewable: c_int = 1; pub const IsViewable: c_int = 2; // modifier keys mask pub const ShiftMask: c_uint = 0x01; pub const LockMask: c_uint = 0x02; pub const ControlMask: c_uint = 0x04; pub const Mod1Mask: c_uint = 0x08; pub const Mod2Mask: c_uint = 0x10; pub const Mod3Mask: c_uint = 0x20; pub const Mod4Mask: c_uint = 0x40; pub const Mod5Mask: c_uint = 0x80; // mouse buttons pub const Button1: c_uint = 1; pub const Button2: c_uint = 2; pub const Button3: c_uint = 3; pub const Button4: c_uint = 4; pub const Button5: c_uint = 5; // size hints mask pub const USPosition: c_long = 0x0001; pub const USSize: c_long = 0x0002; pub const PPosition: c_long = 0x0004; pub const PSize: c_long = 0x0008; pub const PMinSize: c_long = 0x0010; pub const PMaxSize: c_long = 0x0020; pub const PResizeInc: c_long = 0x0040; pub const PAspect: c_long = 0x0080; pub const PBaseSize: c_long = 0x0100; pub const PWinGravity: c_long = 0x0200; pub const PAllHints: c_long = PPosition | PSize | PMinSize | PMaxSize | PResizeInc | PAspect; // Used in ChangeSaveSet pub const SetModeInsert: c_int = 0; pub const SetModeDelete: c_int = 1; // Used in ChangeCloseDownMode pub const DestroyAll: c_int = 0; pub const RetainPermanent: c_int = 1; pub const RetainTemporary: c_int = 2; // Window stacking method (in configureWindow) pub const Above: c_int = 0; pub const Below: c_int = 1; pub const TopIf: c_int = 2; pub const BottomIf: c_int = 3; pub const Opposite: c_int = 4; // Circulation direction pub const RaiseLowest: c_int = 0; pub const LowerHighest: c_int = 1; // graphics functions pub const GXclear: c_int = 0x0; pub const GXand: c_int = 0x1; pub const GXandReverse: c_int = 0x2; pub const GXcopy: c_int = 0x3; pub const GXandInverted: c_int = 0x4; pub const GXnoop: c_int = 0x5; pub const GXxor: c_int = 0x6; pub const GXor: c_int = 0x7; pub const GXnor: c_int = 0x8; pub const GXequiv: c_int = 0x9; pub const GXinvert: c_int = 0xa; pub const GXorReverse: c_int = 0xb; pub const GXcopyInverted: c_int = 0xc; pub const GXorInverted: c_int = 0xd; pub const GXnand: c_int = 0xe; pub const GXset: c_int = 0xf; // LineStyle pub const LineSolid: c_int = 0; pub const LineOnOffDash: c_int = 1; pub const LineDoubleDash: c_int = 2; // capStyle pub const CapNotLast: c_int = 0; pub const CapButt: c_int = 1; pub const CapRound: c_int = 2; pub const CapProjecting: c_int = 3; // joinStyle pub const JoinMiter: c_int = 0; pub const JoinRound: c_int = 1; pub const JoinBevel: c_int = 2; // fillStyle pub const FillSolid: c_int = 0; pub const FillTiled: c_int = 1; pub const FillStippled: c_int = 2; pub const FillOpaqueStippled: c_int = 3; // fillRule pub const EvenOddRule: c_int = 0; pub const WindingRule: c_int = 1; // subwindow mode pub const ClipByChildren: c_int = 0; pub const IncludeInferiors: c_int = 1; // CoordinateMode for drawing routines pub const CoordModeOrigin: c_int = 0; pub const CoordModePrevious: c_int = 1; // Polygon shapes pub const Complex: c_int = 0; pub const Nonconvex: c_int = 1; pub const Convex: c_int = 2; // Arc modes for PolyFillArc pub const ArcChord: c_int = 0; pub const ArcPieSlice: c_int = 1; // GC components pub const GCFunction: c_uint = (1<<0); pub const GCPlaneMask: c_uint = (1<<1); pub const GCForeground: c_uint = (1<<2); pub const GCBackground: c_uint = (1<<3); pub const GCLineWidth: c_uint = (1<<4); pub const GCLineStyle: c_uint = (1<<5); pub const GCCapStyle: c_uint = (1<<6); pub const GCJoinStyle: c_uint = (1<<7); pub const GCFillStyle: c_uint = (1<<8); pub const GCFillRule: c_uint = (1<<9); pub const GCTile: c_uint = (1<<10); pub const GCStipple: c_uint = (1<<11); pub const GCTileStipXOrigin: c_uint = (1<<12); pub const GCTileStipYOrigin: c_uint = (1<<13); pub const GCFont : c_uint = (1<<14); pub const GCSubwindowMode: c_uint = (1<<15); pub const GCGraphicsExposures: c_uint = (1<<16); pub const GCClipXOrigin: c_uint = (1<<17); pub const GCClipYOrigin: c_uint = (1<<18); pub const GCClipMask: c_uint = (1<<19); pub const GCDashOffset: c_uint = (1<<20); pub const GCDashList: c_uint = (1<<21); pub const GCArcMode: c_uint = (1<<22); pub const GCLastBit: c_uint = 22; // draw direction pub const FontLeftToRight: c_int = 0; pub const FontRightToLeft: c_int = 1; pub const FontChange: c_uchar = 255; // QueryBestSize Class pub const CursorShape: c_int = 0; pub const TileShape: c_int = 1; pub const StippleShape: c_int = 2; // keyboard autorepeat pub const AutoRepeatModeOff: c_int = 0; pub const AutoRepeatModeOn: c_int = 1; pub const AutoRepeatModeDefault: c_int = 2; pub const LedModeOff: c_int = 0; pub const LedModeOn: c_int = 1; // masks for ChangeKeyboardControl pub const KBKeyClickPercent: c_ulong = (1<<0); pub const KBBellPercent: c_ulong = (1<<1); pub const KBBellPitch: c_ulong = (1<<2); pub const KBBellDuration: c_ulong = (1<<3); pub const KBLed: c_ulong = (1<<4); pub const KBLedMode: c_ulong = (1<<5); pub const KBKey: c_ulong = (1<<6); pub const KBAutoRepeatMode: c_ulong = (1<<7); pub const MappingSuccess: c_uchar = 0; pub const MappingBusy: c_uchar = 1; pub const MappingFailed: c_uchar = 2; pub const MappingModifier: c_int = 0; pub const MappingKeyboard: c_int = 1; pub const MappingPointer: c_int = 2; // screensaver pub const DontPreferBlanking: c_int = 0; pub const PreferBlanking: c_int = 1; pub const DefaultBlanking: c_int = 2; pub const DisableScreenSaver: c_int = 0; pub const DisableScreenInterval: c_int = 0; pub const DontAllowExposures: c_int = 0; pub const AllowExposures: c_int = 1; pub const DefaultExposures: c_int = 2; pub const ScreenSaverReset: c_int = 0; pub const ScreenSaverActive: c_int = 1; // hosts and connections pub const HostInsert: c_uchar = 0; pub const HostDelete: c_uchar = 1; pub const EnableAccess: c_int = 1; pub const DisableAccess: c_int = 0; // visual class pub const StaticGray: c_int = 0; pub const GrayScale: c_int = 1; pub const StaticColor: c_int = 2; pub const PseudoColor: c_int = 3; pub const TrueColor: c_int = 4; pub const DirectColor: c_int = 5; // visual info mask pub const VisualNoMask: c_long = 0x0000; pub const VisualIDMask: c_long = 0x0001; pub const VisualScreenMask: c_long = 0x0002; pub const VisualDepthMask: c_long = 0x0004; pub const VisualClassMask: c_long = 0x0008; pub const VisualRedMaskMask: c_long = 0x0010; pub const VisualGreenMaskMask: c_long = 0x0020; pub const VisualBlueMaskMask: c_long = 0x0040; pub const VisualColormapSizeMask: c_long = 0x0080; pub const VisualBitsPerRGBMask: c_long = 0x0100; pub const VisualAllMask: c_long = 0x01ff; // window attributes pub const CWBackPixmap: c_ulong = 0x0001; pub const CWBackPixel: c_ulong = 0x0002; pub const CWBorderPixmap: c_ulong = 0x0004; pub const CWBorderPixel: c_ulong = 0x0008; pub const CWBitGravity: c_ulong = 0x0010; pub const CWWinGravity: c_ulong = 0x0020; pub const CWBackingStore: c_ulong = 0x0040; pub const CWBackingPlanes: c_ulong = 0x0080; pub const CWBackingPixel: c_ulong = 0x0100; pub const CWOverrideRedirect: c_ulong = 0x0200; pub const CWSaveUnder: c_ulong = 0x0400; pub const CWEventMask: c_ulong = 0x0800; pub const CWDontPropagate: c_ulong = 0x1000; pub const CWColormap: c_ulong = 0x2000; pub const CWCursor: c_ulong = 0x4000; // window classes pub const InputOutput: c_int = 1; pub const InputOnly: c_int = 2; // XCreateIC values pub const XIMPreeditArea: c_int = 0x0001; pub const XIMPreeditCallbacks: c_int = 0x0002; pub const XIMPreeditPosition: c_int = 0x0004; pub const XIMPreeditNothing: c_int = 0x0008; pub const XIMPreeditNone: c_int = 0x0010; pub const XIMStatusArea: c_int = 0x0100; pub const XIMStatusCallbacks: c_int = 0x0200; pub const XIMStatusNothing: c_int = 0x0400; pub const XIMStatusNone: c_int = 0x0800; // Byte order used in imageByteOrder and bitmapBitOrder pub const LSBFirst: c_int = 0; pub const MSBFirst: c_int = 1; // Reserved resource and constant definitions //pub const None: c_int = 0; pub const ParentRelative: c_int = 1; pub const CopyFromParent: c_int = 0; pub const PointerWindow: c_int = 0; pub const InputFocus: c_int = 1; pub const PointerRoot: c_int = 1; pub const AnyPropertyType: c_int = 0; pub const AnyKey: c_int = 0; pub const AnyButton: c_int = 0; pub const AllTemporary: c_int = 0; pub const CurrentTime: Time = 0; pub const NoSymbol: c_int = 0; /* Definitions for the X window system likely to be used by applications */ pub const X_PROTOCOL: c_int = 11; pub const X_PROTOCOL_REVISION: c_int = 0; pub const XNVaNestedList: &'static str = "XNVaNestedList"; pub const XNQueryInputStyle: &'static str = "queryInputStyle"; pub const XNClientWindow: &'static str = "clientWindow"; pub const XNInputStyle: &'static str = "inputStyle"; pub const XNFocusWindow: &'static str = "focusWindow"; pub const XNResourceName: &'static str = "resourceName"; pub const XNResourceClass: &'static str = "resourceClass"; pub const XNGeometryCallback: &'static str = "geometryCallback"; pub const XNDestroyCallback: &'static str = "destroyCallback"; pub const XNFilterEvents: &'static str = "filterEvents"; pub const XNPreeditStartCallback: &'static str = "preeditStartCallback"; pub const XNPreeditDoneCallback: &'static str = "preeditDoneCallback"; pub const XNPreeditDrawCallback: &'static str = "preeditDrawCallback"; pub const XNPreeditCaretCallback: &'static str = "preeditCaretCallback"; pub const XNPreeditStateNotifyCallback: &'static str = "preeditStateNotifyCallback"; pub const XNPreeditAttributes: &'static str = "preeditAttributes"; pub const XNStatusStartCallback: &'static str = "statusStartCallback"; pub const XNStatusDoneCallback: &'static str = "statusDoneCallback"; pub const XNStatusDrawCallback: &'static str = "statusDrawCallback"; pub const XNStatusAttributes: &'static str = "statusAttributes"; pub const XNArea: &'static str = "area"; pub const XNAreaNeeded: &'static str = "areaNeeded"; pub const XNSpotLocation: &'static str = "spotLocation"; pub const XNColormap: &'static str = "colorMap"; pub const XNStdColormap: &'static str = "stdColorMap"; pub const XNForeground: &'static str = "foreground"; pub const XNBackground: &'static str = "background"; pub const XNBackgroundPixmap: &'static str = "backgroundPixmap"; pub const XNFontSet: &'static str = "fontSet"; pub const XNLineSpace: &'static str = "lineSpace"; pub const XNCursor: &'static str = "cursor"; pub const XNVaNestedList_0: &'static [u8] = b"XNVaNestedList\0"; pub const XNQueryInputStyle_0: &'static [u8] = b"queryInputStyle\0"; pub const XNClientWindow_0: &'static [u8] = b"clientWindow\0"; pub const XNInputStyle_0: &'static [u8] = b"inputStyle\0"; pub const XNFocusWindow_0: &'static [u8] = b"focusWindow\0"; pub const XNResourceName_0: &'static [u8] = b"resourceName\0"; pub const XNResourceClass_0: &'static [u8] = b"resourceClass\0"; pub const XNGeometryCallback_0: &'static [u8] = b"geometryCallback\0"; pub const XNDestroyCallback_0: &'static [u8] = b"destroyCallback\0"; pub const XNFilterEvents_0: &'static [u8] = b"filterEvents\0"; pub const XNPreeditStartCallback_0: &'static [u8] = b"preeditStartCallback\0"; pub const XNPreeditDoneCallback_0: &'static [u8] = b"preeditDoneCallback\0"; pub const XNPreeditDrawCallback_0: &'static [u8] = b"preeditDrawCallback\0"; pub const XNPreeditCaretCallback_0: &'static [u8] = b"preeditCaretCallback\0"; pub const XNPreeditStateNotifyCallback_0: &'static [u8] = b"preeditStateNotifyCallback\0"; pub const XNPreeditAttributes_0: &'static [u8] = b"preeditAttributes\0"; pub const XNStatusStartCallback_0: &'static [u8] = b"statusStartCallback\0"; pub const XNStatusDoneCallback_0: &'static [u8] = b"statusDoneCallback\0"; pub const XNStatusDrawCallback_0: &'static [u8] = b"statusDrawCallback\0"; pub const XNStatusAttributes_0: &'static [u8] = b"statusAttributes\0"; pub const XNArea_0: &'static [u8] = b"area\0"; pub const XNAreaNeeded_0: &'static [u8] = b"areaNeeded\0"; pub const XNSpotLocation_0: &'static [u8] = b"spotLocation\0"; pub const XNColormap_0: &'static [u8] = b"colorMap\0"; pub const XNStdColormap_0: &'static [u8] = b"stdColorMap\0"; pub const XNForeground_0: &'static [u8] = b"foreground\0"; pub const XNBackground_0: &'static [u8] = b"background\0"; pub const XNBackgroundPixmap_0: &'static [u8] = b"backgroundPixmap\0"; pub const XNFontSet_0: &'static [u8] = b"fontSet\0"; pub const XNLineSpace_0: &'static [u8] = b"lineSpace\0"; pub const XNCursor_0: &'static [u8] = b"cursor\0"; pub const XNQueryIMValuesList: &'static str = "queryIMValuesList"; pub const XNQueryICValuesList: &'static str = "queryICValuesList"; pub const XNVisiblePosition: &'static str = "visiblePosition"; pub const XNR6PreeditCallback: &'static str = "r6PreeditCallback"; pub const XNStringConversionCallback: &'static str = "stringConversionCallback"; pub const XNStringConversion: &'static str = "stringConversion"; pub const XNResetState: &'static str = "resetState"; pub const XNHotKey: &'static str = "hotKey"; pub const XNHotKeyState: &'static str = "hotKeyState"; pub const XNPreeditState: &'static str = "preeditState"; pub const XNSeparatorofNestedList: &'static str = "separatorofNestedList"; pub const XNQueryIMValuesList_0: &'static [u8] = b"queryIMValuesList\0"; pub const XNQueryICValuesList_0: &'static [u8] = b"queryICValuesList\0"; pub const XNVisiblePosition_0: &'static [u8] = b"visiblePosition\0"; pub const XNR6PreeditCallback_0: &'static [u8] = b"r6PreeditCallback\0"; pub const XNStringConversionCallback_0: &'static [u8] = b"stringConversionCallback\0"; pub const XNStringConversion_0: &'static [u8] = b"stringConversion\0"; pub const XNResetState_0: &'static [u8] = b"resetState\0"; pub const XNHotKey_0: &'static [u8] = b"hotKey\0"; pub const XNHotKeyState_0: &'static [u8] = b"hotKeyState\0"; pub const XNPreeditState_0: &'static [u8] = b"preeditState\0"; pub const XNSeparatorofNestedList_0: &'static [u8] = b"separatorofNestedList\0"; pub const XBufferOverflow: i32 = -1; pub const XLookupNone: i32 = 1; pub const XLookupChars: i32 = 2; pub const XLookupKeySym: i32 = 3; pub const XLookupBoth: i32 = 4; // Xkb constants pub const XkbActionMessageLength: usize = 6; pub const XkbOD_Success: c_int = 0; pub const XkbOD_BadLibraryVersion: c_int = 1; pub const XkbOD_ConnectionRefused: c_int = 2; pub const XkbOD_NonXkbServer: c_int = 3; pub const XkbOD_BadServerVersion: c_int = 4; pub const XkbLC_ForceLatinLookup: c_uint = 1 << 0; pub const XkbLC_ConsumeLookupMods: c_uint = 1 << 1; pub const XkbLC_AlwaysConsumeShiftAndLock: c_uint = 1 << 2; pub const XkbLC_IgnoreNewKeyboards: c_uint = 1 << 3; pub const XkbLC_ControlFallback: c_uint = 1 << 4; pub const XkbLC_ConsumeKeysOnComposeFail: c_uint = 1 << 29; pub const XkbLC_ComposeLED: c_uint = 1 << 30; pub const XkbLC_BeepOnComposeFail: c_uint = 1 << 31; pub const XkbLC_AllComposeControls: c_uint = 0xc000_0000; pub const XkbLC_AllControls: c_uint = 0xc000_001f; pub const XkbNewKeyboardNotify: c_int = 0; pub const XkbMapNotify: c_int = 1; pub const XkbStateNotify: c_int = 2; pub const XkbControlsNotify: c_int = 3; pub const XkbIndicatorStateNotify: c_int = 4; pub const XkbIndicatorMapNotify: c_int = 5; pub const XkbNamesNotify: c_int = 6; pub const XkbCompatMapNotify: c_int = 7; pub const XkbBellNotify: c_int = 8; pub const XkbActionMessage: c_int = 9; pub const XkbAccessXNotify: c_int = 10; pub const XkbExtensionDeviceNotify: c_int = 11; pub const XkbNewKeyboardNotifyMask: c_ulong = 1 << 0; pub const XkbMapNotifyMask: c_ulong = 1 << 1; pub const XkbStateNotifyMask: c_ulong = 1 << 2; pub const XkbControlsNotifyMask: c_ulong = 1 << 3; pub const XkbIndicatorStateNotifyMask: c_ulong = 1 << 4; pub const XkbIndicatorMapNotifyMask: c_ulong = 1 << 5; pub const XkbNamesNotifyMask: c_ulong = 1 << 6; pub const XkbCompatMapNotifyMask: c_ulong = 1 << 7; pub const XkbBellNotifyMask: c_ulong = 1 << 8; pub const XkbActionMessageMask: c_ulong = 1 << 9; pub const XkbAccessXNotifyMask: c_ulong = 1 << 10; pub const XkbExtensionDeviceNotifyMask: c_ulong = 1 << 11; pub const XkbAllEventsMask: c_ulong = 0xfff; // Bitmask returned by XParseGeometry pub const NoValue: c_int = 0x0000; pub const XValue: c_int = 0x0001; pub const YValue: c_int = 0x0002; pub const WidthValue: c_int = 0x0004; pub const HeightValue: c_int = 0x0008; pub const AllValues: c_int = 0x000f; pub const XNegative: c_int = 0x0010; pub const YNegative: c_int = 0x0020; // Definition for flags of XWMHints pub const InputHint: c_long = 1 << 0; pub const StateHint: c_long = 1 << 1; pub const IconPixmapHint: c_long = 1 << 2; pub const IconWindowHint: c_long = 1 << 3; pub const IconPositionHint: c_long = 1 << 4; pub const IconMaskHint: c_long = 1 << 5; pub const WindowGroupHint: c_long = 1 << 6; pub const AllHints: c_long = InputHint | StateHint | IconPixmapHint | IconWindowHint | IconPositionHint | IconMaskHint | WindowGroupHint; pub const XUrgencyHint: c_long = 1 << 8; // XICCEncodingStyle pub const XStringStyle: c_int = 0; pub const XCompoundTextStyle: c_int = 1; pub const XTextStyle: c_int = 2; pub const XStdICCTextStyle: c_int = 3; pub const XUTF8StringStyle: c_int = 4; // // inline functions // #[cfg(feature = "xlib")] #[inline] pub unsafe fn XUniqueContext () -> XContext { XrmUniqueQuark() } x11-2.18.2/src/xlib_xcb.rs010064400017500001750000000004041361324422500133650ustar0000000000000000use std::os::raw::c_void; use ::xlib::Display; x11_link! { Xlib_xcb, xlib_xcb, ["libX11-xcb.so.1", "libX11-xcb.so"], 1, pub fn XGetXCBConnection(_1: *mut Display) -> *mut xcb_connection_t, variadic: globals: } pub type xcb_connection_t = c_void; x11-2.18.2/src/xmd.rs010064400017500001750000000003421361324422500123640ustar0000000000000000pub type INT8 = i8; pub type INT16 = i16; pub type INT32 = i32; pub type INT64 = i64; pub type CARD8 = u8; pub type CARD16 = u16; pub type CARD32 = u32; pub type CARD64 = u64; pub type BYTE = CARD8; pub type BOOL = CARD8; x11-2.18.2/src/xmu.rs010064400017500001750000000327511361324422500124160ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::{ c_char, c_int, c_uchar, c_uint, c_ulong, c_void, }; use libc::FILE; use ::xlib::{ Display, GC, Screen, XColor, XComposeStatus, XErrorEvent, XEvent, XKeyEvent, XrmValue, XSizeHints, XStandardColormap, XVisualInfo, }; use ::xt::{ Widget, XtAppContext, }; // // functions // x11_link! { Xmu, xmu, ["libXmu.so.6", "libXmu.so"], 132, pub fn XmuAddCloseDisplayHook (_3: *mut Display, _2: Option c_int>, _1: *mut c_char) -> *mut c_char, pub fn XmuAddInitializer (_2: Option, _1: *mut c_char) -> (), pub fn XmuAllStandardColormaps (_1: *mut Display) -> c_int, pub fn XmuAppendSegment (_2: *mut XmuSegment, _1: *mut XmuSegment) -> c_int, pub fn XmuAreaAnd (_2: *mut XmuArea, _1: *mut XmuArea) -> *mut XmuArea, pub fn XmuAreaCopy (_2: *mut XmuArea, _1: *mut XmuArea) -> *mut XmuArea, pub fn XmuAreaDup (_1: *mut XmuArea) -> *mut XmuArea, pub fn XmuAreaNot (_5: *mut XmuArea, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> *mut XmuArea, pub fn XmuAreaOrXor (_3: *mut XmuArea, _2: *mut XmuArea, _1: c_int) -> *mut XmuArea, pub fn XmuCallInitializers (_1: XtAppContext) -> (), pub fn XmuClientWindow (_2: *mut Display, _1: c_ulong) -> c_ulong, pub fn XmuCompareISOLatin1 (_2: *const c_char, _1: *const c_char) -> c_int, pub fn XmuConvertStandardSelection (_8: Widget, _7: c_ulong, _6: *mut c_ulong, _5: *mut c_ulong, _4: *mut c_ulong, _3: *mut *mut c_char, _2: *mut c_ulong, _1: *mut c_int) -> c_char, pub fn XmuCopyISOLatin1Lowered (_2: *mut c_char, _1: *const c_char) -> (), pub fn XmuCopyISOLatin1Uppered (_2: *mut c_char, _1: *const c_char) -> (), pub fn XmuCreateColormap (_2: *mut Display, _1: *mut XStandardColormap) -> c_int, pub fn XmuCreatePixmapFromBitmap (_8: *mut Display, _7: c_ulong, _6: c_ulong, _5: c_uint, _4: c_uint, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_ulong, pub fn XmuCreateStippledPixmap (_4: *mut Screen, _3: c_ulong, _2: c_ulong, _1: c_uint) -> c_ulong, pub fn XmuCursorNameToIndex (_1: *const c_char) -> c_int, pub fn XmuCvtBackingStoreToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XmuCvtFunctionToCallback (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), pub fn XmuCvtGravityToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XmuCvtJustifyToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XmuCvtLongToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XmuCvtOrientationToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XmuCvtShapeStyleToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XmuCvtStringToBackingStore (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), pub fn XmuCvtStringToBitmap (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), pub fn XmuCvtStringToColorCursor (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XmuCvtStringToCursor (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), pub fn XmuCvtStringToGravity (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), pub fn XmuCvtStringToJustify (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), pub fn XmuCvtStringToLong (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), pub fn XmuCvtStringToOrientation (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), pub fn XmuCvtStringToShapeStyle (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XmuCvtStringToWidget (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), pub fn XmuCvtWidgetToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XmuDeleteStandardColormap (_3: *mut Display, _2: c_int, _1: c_ulong) -> (), pub fn XmuDestroyScanlineList (_1: *mut XmuScanline) -> (), pub fn XmuDestroySegmentList (_1: *mut XmuSegment) -> (), pub fn XmuDistinguishableColors (_2: *mut XColor, _1: c_int) -> c_int, pub fn XmuDistinguishablePixels (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: c_int) -> c_int, pub fn XmuDQAddDisplay (_3: *mut XmuDisplayQueue, _2: *mut Display, _1: *mut c_char) -> *mut XmuDisplayQueueEntry, pub fn XmuDQCreate (_3: Option c_int>, _2: Option c_int>, _1: *mut c_char) -> *mut XmuDisplayQueue, pub fn XmuDQDestroy (_2: *mut XmuDisplayQueue, _1: c_int) -> c_int, pub fn XmuDQLookupDisplay (_2: *mut XmuDisplayQueue, _1: *mut Display) -> *mut XmuDisplayQueueEntry, pub fn XmuDQRemoveDisplay (_2: *mut XmuDisplayQueue, _1: *mut Display) -> c_int, pub fn XmuDrawLogo (_8: *mut Display, _7: c_ulong, _6: GC, _5: GC, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> (), pub fn XmuDrawRoundedRectangle (_9: *mut Display, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XmuFillRoundedRectangle (_9: *mut Display, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> (), pub fn XmuGetAtomName (_2: *mut Display, _1: c_ulong) -> *mut c_char, pub fn XmuGetColormapAllocation (_5: *mut XVisualInfo, _4: c_ulong, _3: *mut c_ulong, _2: *mut c_ulong, _1: *mut c_ulong) -> c_int, pub fn XmuGetHostname (_2: *mut c_char, _1: c_int) -> c_int, pub fn XmuInternAtom (_2: *mut Display, _1: AtomPtr) -> c_ulong, pub fn XmuInternStrings (_4: *mut Display, _3: *mut *mut c_char, _2: c_uint, _1: *mut c_ulong) -> (), pub fn XmuLocateBitmapFile (_8: *mut Screen, _7: *const c_char, _6: *mut c_char, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_ulong, pub fn XmuLocatePixmapFile (_11: *mut Screen, _10: *const c_char, _9: c_ulong, _8: c_ulong, _7: c_uint, _6: *mut c_char, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_ulong, pub fn XmuLookupAPL (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, pub fn XmuLookupArabic (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, pub fn XmuLookupCloseDisplayHook (_4: *mut Display, _3: *mut c_char, _2: Option c_int>, _1: *mut c_char) -> c_int, pub fn XmuLookupCyrillic (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, pub fn XmuLookupGreek (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, pub fn XmuLookupHebrew (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, pub fn XmuLookupJISX0201 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, pub fn XmuLookupKana (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, pub fn XmuLookupLatin1 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, pub fn XmuLookupLatin2 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, pub fn XmuLookupLatin3 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, pub fn XmuLookupLatin4 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int, pub fn XmuLookupStandardColormap (_7: *mut Display, _6: c_int, _5: c_ulong, _4: c_uint, _3: c_ulong, _2: c_int, _1: c_int) -> c_int, pub fn XmuLookupString (_6: *mut XKeyEvent, _5: *mut c_uchar, _4: c_int, _3: *mut c_ulong, _2: *mut XComposeStatus, _1: c_ulong) -> c_int, pub fn XmuMakeAtom (_1: *const c_char) -> AtomPtr, pub fn XmuNameOfAtom (_1: AtomPtr) -> *mut c_char, pub fn XmuNCopyISOLatin1Lowered (_3: *mut c_char, _2: *const c_char, _1: c_int) -> (), pub fn XmuNCopyISOLatin1Uppered (_3: *mut c_char, _2: *const c_char, _1: c_int) -> (), pub fn XmuNewArea (_4: c_int, _3: c_int, _2: c_int, _1: c_int) -> *mut XmuArea, pub fn XmuNewCvtStringToWidget (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XmuNewScanline (_3: c_int, _2: c_int, _1: c_int) -> *mut XmuScanline, pub fn XmuNewSegment (_2: c_int, _1: c_int) -> *mut XmuSegment, pub fn XmuOptimizeArea (_1: *mut XmuArea) -> *mut XmuArea, pub fn XmuOptimizeScanline (_1: *mut XmuScanline) -> *mut XmuScanline, pub fn XmuPrintDefaultErrorMessage (_3: *mut Display, _2: *mut XErrorEvent, _1: *mut FILE) -> c_int, pub fn XmuReadBitmapData (_6: *mut FILE, _5: *mut c_uint, _4: *mut c_uint, _3: *mut *mut c_uchar, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XmuReadBitmapDataFromFile (_6: *const c_char, _5: *mut c_uint, _4: *mut c_uint, _3: *mut *mut c_uchar, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XmuRegisterExternalAgent (_4: Widget, _3: *mut c_void, _2: *mut XEvent, _1: *mut c_char) -> (), pub fn XmuReleaseStippledPixmap (_2: *mut Screen, _1: c_ulong) -> (), pub fn XmuRemoveCloseDisplayHook (_4: *mut Display, _3: *mut c_char, _2: Option c_int>, _1: *mut c_char) -> c_int, pub fn XmuReshapeWidget (_4: Widget, _3: c_int, _2: c_int, _1: c_int) -> c_char, pub fn XmuScanlineAnd (_2: *mut XmuScanline, _1: *mut XmuScanline) -> *mut XmuScanline, pub fn XmuScanlineAndSegment (_2: *mut XmuScanline, _1: *mut XmuSegment) -> *mut XmuScanline, pub fn XmuScanlineCopy (_2: *mut XmuScanline, _1: *mut XmuScanline) -> *mut XmuScanline, pub fn XmuScanlineEqu (_2: *mut XmuScanline, _1: *mut XmuScanline) -> c_int, pub fn XmuScanlineNot (_3: *mut XmuScanline, _2: c_int, _1: c_int) -> *mut XmuScanline, pub fn XmuScanlineOr (_2: *mut XmuScanline, _1: *mut XmuScanline) -> *mut XmuScanline, pub fn XmuScanlineOrSegment (_2: *mut XmuScanline, _1: *mut XmuSegment) -> *mut XmuScanline, pub fn XmuScanlineXor (_2: *mut XmuScanline, _1: *mut XmuScanline) -> *mut XmuScanline, pub fn XmuScanlineXorSegment (_2: *mut XmuScanline, _1: *mut XmuSegment) -> *mut XmuScanline, pub fn XmuScreenOfWindow (_2: *mut Display, _1: c_ulong) -> *mut Screen, pub fn XmuSimpleErrorHandler (_2: *mut Display, _1: *mut XErrorEvent) -> c_int, pub fn XmuStandardColormap (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_uint, _5: c_ulong, _4: c_ulong, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> *mut XStandardColormap, pub fn XmuUpdateMapHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int, pub fn XmuValidArea (_1: *mut XmuArea) -> c_int, pub fn XmuValidScanline (_1: *mut XmuScanline) -> c_int, pub fn XmuVisualStandardColormaps (_6: *mut Display, _5: c_int, _4: c_ulong, _3: c_uint, _2: c_int, _1: c_int) -> c_int, pub fn XmuWnCountOwnedResources (_3: *mut XmuWidgetNode, _2: *mut XmuWidgetNode, _1: c_int) -> c_int, pub fn XmuWnFetchResources (_3: *mut XmuWidgetNode, _2: Widget, _1: *mut XmuWidgetNode) -> (), pub fn XmuWnInitializeNodes (_2: *mut XmuWidgetNode, _1: c_int) -> (), pub fn XmuWnNameToNode (_3: *mut XmuWidgetNode, _2: c_int, _1: *const c_char) -> *mut XmuWidgetNode, variadic: pub fn XmuSnprintf (_3: *mut c_char, _2: c_int, _1: *const c_char) -> c_int, globals: pub static _XA_ATOM_PAIR: AtomPtr, pub static _XA_CHARACTER_POSITION: AtomPtr, pub static _XA_CLASS: AtomPtr, pub static _XA_CLIENT_WINDOW: AtomPtr, pub static _XA_CLIPBOARD: AtomPtr, pub static _XA_COMPOUND_TEXT: AtomPtr, pub static _XA_DECNET_ADDRESS: AtomPtr, pub static _XA_DELETE: AtomPtr, pub static _XA_FILENAME: AtomPtr, pub static _XA_HOSTNAME: AtomPtr, pub static _XA_IP_ADDRESS: AtomPtr, pub static _XA_LENGTH: AtomPtr, pub static _XA_LIST_LENGTH: AtomPtr, pub static _XA_NAME: AtomPtr, pub static _XA_NET_ADDRESS: AtomPtr, pub static _XA_NULL: AtomPtr, pub static _XA_OWNER_OS: AtomPtr, pub static _XA_SPAN: AtomPtr, pub static _XA_TARGETS: AtomPtr, pub static _XA_TEXT: AtomPtr, pub static _XA_TIMESTAMP: AtomPtr, pub static _XA_USER: AtomPtr, pub static _XA_UTF8_STRING: AtomPtr, } // // types // // TODO structs #[repr(C)] pub struct _AtomRec; #[repr(C)] pub struct _XmuArea; #[repr(C)] pub struct _XmuDisplayQueue; #[repr(C)] pub struct _XmuDisplayQueueEntry; #[repr(C)] pub struct _XmuScanline; #[repr(C)] pub struct _XmuSegment; #[repr(C)] pub struct _XmuWidgetNode; // struct typedefs pub type AtomPtr = *mut _AtomRec; pub type XmuArea = _XmuArea; pub type XmuDisplayQueue = _XmuDisplayQueue; pub type XmuDisplayQueueEntry = _XmuDisplayQueueEntry; pub type XmuScanline = _XmuScanline; pub type XmuSegment = _XmuSegment; pub type XmuWidgetNode = _XmuWidgetNode; x11-2.18.2/src/xrandr.rs010064400017500001750000000526431361324422500131050ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::{ c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort }; use xlib::{ Atom, Bool, Display, Drawable, Status, Time, XEvent, XID, Window }; use xrender::{ XFixed, XTransform }; // // functions // x11_link! { Xrandr, xrandr, ["libXrandr.so.2", "libXrandr.so"], 70, pub fn XRRAddOutputMode (dpy: *mut Display, output: RROutput, mode: RRMode) -> (), pub fn XRRAllocGamma (size: c_int) -> *mut XRRCrtcGamma, pub fn XRRAllocModeInfo (name: *const c_char, nameLength: c_int) -> *mut XRRModeInfo, pub fn XRRAllocateMonitor (dpy: *mut Display, noutput: c_int) -> *mut XRRMonitorInfo, pub fn XRRChangeOutputProperty (dpy: *mut Display, output: RROutput, property: Atom, type_: Atom, format: c_int, mode: c_int, data: *const c_uchar, nelements: c_int) -> (), pub fn XRRChangeProviderProperty (dpy: *mut Display, provider: RRProvider, property: Atom, type_: Atom, format: c_int, mode: c_int, data: *const c_uchar, nelements: c_int) -> (), pub fn XRRConfigCurrentConfiguration (config: *mut XRRScreenConfiguration, rotation: *mut Rotation) -> SizeID, pub fn XRRConfigCurrentRate (config: *mut XRRScreenConfiguration) -> c_short, pub fn XRRConfigRates (config: *mut XRRScreenConfiguration, sizeID: c_int, nrates: *mut c_int) -> *mut c_short, pub fn XRRConfigRotations (config: *mut XRRScreenConfiguration, current_rotation: *mut Rotation) -> Rotation, pub fn XRRConfigSizes (config: *mut XRRScreenConfiguration, nsizes: *mut c_int) -> *mut XRRScreenSize, pub fn XRRConfigTimes (config: *mut XRRScreenConfiguration, config_timestamp: *mut Time) -> Time, pub fn XRRConfigureOutputProperty (dpy: *mut Display, output: RROutput, property: Atom, pending: Bool, range: Bool, num_values: c_int, values: *mut c_long) -> (), pub fn XRRConfigureProviderProperty (dpy: *mut Display, provider: RRProvider, property: Atom, pending: Bool, range: Bool, num_values: c_int, values: *mut c_long) -> (), pub fn XRRCreateMode (dpy: *mut Display, window: Window, modeInfo: *mut XRRModeInfo) -> RRMode, pub fn XRRDeleteMonitor (dpy: *mut Display, window: Window, name: Atom) -> (), pub fn XRRDeleteOutputMode (dpy: *mut Display, output: RROutput, mode: RRMode) -> (), pub fn XRRDeleteOutputProperty (dpy: *mut Display, output: RROutput, property: Atom) -> (), pub fn XRRDeleteProviderProperty (dpy: *mut Display, provider: RRProvider, property: Atom) -> (), pub fn XRRDestroyMode (dpy: *mut Display, mode: RRMode) -> (), pub fn XRRFreeCrtcInfo (crtcInfo: *mut XRRCrtcInfo) -> (), pub fn XRRFreeGamma (gamma: *mut XRRCrtcGamma) -> (), pub fn XRRFreeModeInfo (modeInfo: *mut XRRModeInfo) -> (), pub fn XRRFreeMonitors (monitors: *mut XRRMonitorInfo) -> (), pub fn XRRFreeOutputInfo (outputInfo: *mut XRROutputInfo) -> (), pub fn XRRFreePanning (panning: *mut XRRPanning) -> (), pub fn XRRFreeProviderInfo (provider: *mut XRRProviderInfo) -> (), pub fn XRRFreeProviderResources (resources: *mut XRRProviderResources) -> (), pub fn XRRFreeScreenConfigInfo (config: *mut XRRScreenConfiguration) -> (), pub fn XRRFreeScreenResources (resources: *mut XRRScreenResources) -> (), pub fn XRRGetCrtcGamma (dpy: *mut Display, crtc: RRCrtc) -> *mut XRRCrtcGamma, pub fn XRRGetCrtcGammaSize (dpy: *mut Display, crtc: RRCrtc) -> c_int, pub fn XRRGetCrtcInfo (dpy: *mut Display, resources: *mut XRRScreenResources, crtc: RRCrtc) -> *mut XRRCrtcInfo, pub fn XRRGetCrtcTransform (dpy: *mut Display, crtc: RRCrtc, attributes: *mut *mut XRRCrtcTransformAttributes) -> Status, pub fn XRRGetMonitors (dpy: *mut Display, window: Window, get_active: Bool, nmonitors: *mut c_int) -> *mut XRRMonitorInfo, pub fn XRRGetOutputInfo (dpy: *mut Display, resources: *mut XRRScreenResources, output: RROutput) -> *mut XRROutputInfo, pub fn XRRGetOutputPrimary (dpy: *mut Display, window: Window) -> RROutput, pub fn XRRGetOutputProperty (dpy: *mut Display, output: RROutput, property: Atom, offset: c_long, length: c_long, _delete: Bool, pending: Bool, req_type: Atom, actual_type: *mut Atom, actual_format: *mut c_int, nitems: *mut c_ulong, bytes_after: *mut c_ulong, prop: *mut *mut c_uchar) -> c_int, pub fn XRRGetPanning (dpy: *mut Display, resources: *mut XRRScreenResources, crtc: RRCrtc) -> *mut XRRPanning, pub fn XRRGetProviderInfo (dpy: *mut Display, resources: *mut XRRScreenResources, provider: RRProvider) -> *mut XRRProviderInfo, pub fn XRRGetProviderProperty (dpy: *mut Display, provider: RRProvider, property: Atom, offset: c_long, length: c_long, _delete: Bool, pending: Bool, req_type: Atom, actual_type: *mut Atom, actual_format: *mut c_int, nitems: *mut c_ulong, bytes_after: *mut c_ulong, prop: *mut *mut c_uchar) -> c_int, pub fn XRRGetProviderResources (dpy: *mut Display, window: Window) -> *mut XRRProviderResources, pub fn XRRGetScreenInfo (dpy: *mut Display, window: Window) -> *mut XRRScreenConfiguration, pub fn XRRGetScreenResources (dpy: *mut Display, window: Window) -> *mut XRRScreenResources, pub fn XRRGetScreenResourcesCurrent (dpy: *mut Display, window: Window) -> *mut XRRScreenResources, pub fn XRRGetScreenSizeRange (dpy: *mut Display, window: Window, minWidth: *mut c_int, minHeight: *mut c_int, maxWidth: *mut c_int, maxHeight: *mut c_int) -> Status, pub fn XRRListOutputProperties (dpy: *mut Display, output: RROutput, nprop: *mut c_int) -> *mut Atom, pub fn XRRListProviderProperties (dpy: *mut Display, provider: RRProvider, nprop: *mut c_int) -> *mut Atom, pub fn XRRQueryExtension (dpy: *mut Display, event_base_return: *mut c_int, error_base_return: *mut c_int) -> Bool, pub fn XRRQueryOutputProperty (dpy: *mut Display, output: RROutput, property: Atom) -> *mut XRRPropertyInfo, pub fn XRRQueryProviderProperty (dpy: *mut Display, provider: RRProvider, property: Atom) -> *mut XRRPropertyInfo, pub fn XRRQueryVersion (dpy: *mut Display, major_version_return: *mut c_int, minor_version_return: *mut c_int) -> Status, pub fn XRRRates (dpy: *mut Display, screen: c_int, sizeID: c_int, nrates: *mut c_int) -> *mut c_short, pub fn XRRRootToScreen (dpy: *mut Display, root: Window) -> c_int, pub fn XRRRotations (dpy: *mut Display, screen: c_int, current_rotation: *mut Rotation) -> Rotation, pub fn XRRSelectInput (dpy: *mut Display, window: Window, mask: c_int) -> (), pub fn XRRSetCrtcConfig (dpy: *mut Display, resources: *mut XRRScreenResources, crtc: RRCrtc, timestamp: Time, x: c_int, y: c_int, mode: RRMode, rotation: Rotation, outputs: *mut RROutput, noutputs: c_int) -> Status, pub fn XRRSetCrtcGamma (dpy: *mut Display, crtc: RRCrtc, gamma: *mut XRRCrtcGamma) -> (), pub fn XRRSetCrtcTransform (dpy: *mut Display, crtc: RRCrtc, transform: *mut XTransform, filter: *const c_char, params: *mut XFixed, nparams: c_int) -> (), pub fn XRRSetMonitor (dpy: *mut Display, window: Window, monitor: *mut XRRMonitorInfo) -> (), pub fn XRRSetOutputPrimary (dpy: *mut Display, window: Window, output: RROutput) -> (), pub fn XRRSetPanning (dpy: *mut Display, resources: *mut XRRScreenResources, crtc: RRCrtc, panning: *mut XRRPanning) -> Status, pub fn XRRSetProviderOffloadSink (dpy: *mut Display, provider: XID, sink_provider: XID) -> c_int, pub fn XRRSetProviderOutputSource (dpy: *mut Display, provider: XID, source_provider: XID) -> c_int, pub fn XRRSetScreenConfig (dpy: *mut Display, config: *mut XRRScreenConfiguration, draw: Drawable, size_index: c_int, rotation: Rotation, timestamp: Time) -> Status, pub fn XRRSetScreenConfigAndRate (dpy: *mut Display, config: *mut XRRScreenConfiguration, draw: Drawable, size_index: c_int, rotation: Rotation, rate: c_short, timestamp: Time) -> Status, pub fn XRRSetScreenSize (dpy: *mut Display, window: Window, width: c_int, height: c_int, mmWidth: c_int, mmHeight: c_int) -> (), pub fn XRRSizes (dpy: *mut Display, screen: c_int, nsizes: *mut c_int) -> *mut XRRScreenSize, pub fn XRRTimes (dpy: *mut Display, screen: c_int, config_timestamp: *mut Time) -> Time, pub fn XRRUpdateConfiguration (event: *mut XEvent) -> c_int, variadic: globals: } // // types // pub type Connection = c_ushort; pub type Rotation = c_ushort; pub type SizeID = c_ushort; pub type SubpixelOrder = c_ushort; pub type RROutput = XID; pub type RRCrtc = XID; pub type RRMode = XID; pub type RRProvider = XID; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRScreenSize { pub width: c_int, pub height: c_int, pub mwidth: c_int, pub mheight: c_int, } #[repr(C)] pub struct XRRScreenConfiguration; pub type XRRModeFlags = c_ulong; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRModeInfo { pub id: RRMode, pub width: c_uint, pub height: c_uint, pub dotClock: c_ulong, pub hSyncStart: c_uint, pub hSyncEnd: c_uint, pub hTotal: c_uint, pub hSkew: c_uint, pub vSyncStart: c_uint, pub vSyncEnd: c_uint, pub vTotal: c_uint, pub name: *mut c_char, pub nameLength: c_uint, pub modeFlags: XRRModeFlags, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRScreenResources { pub timestamp: Time, pub configTimestamp: Time, pub ncrtc: c_int, pub crtcs: *mut RRCrtc, pub noutput: c_int, pub outputs: *mut RROutput, pub nmode: c_int, pub modes: *mut XRRModeInfo, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRROutputInfo { pub timestamp: Time, pub crtc: RRCrtc, pub name: *mut c_char, pub nameLen: c_int, pub mm_width: c_ulong, pub mm_height: c_ulong, pub connection: Connection, pub subpixel_order: SubpixelOrder, pub ncrtc: c_int, pub crtcs: *mut RRCrtc, pub nclone: c_int, pub clones: *mut RROutput, pub nmode: c_int, pub npreferred: c_int, pub modes: *mut RRMode, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRPropertyInfo { pub pending: Bool, pub range: Bool, pub immutable: Bool, pub num_values: c_int, pub values: *mut c_long, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRCrtcInfo { pub timestamp: Time, pub x: c_int, pub y: c_int, pub width: c_uint, pub height: c_uint, pub mode: RRMode, pub rotation: Rotation, pub noutput: c_int, pub outputs: *mut RROutput, pub rotations: Rotation, pub npossible: c_int, pub possible: *mut RROutput, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRCrtcGamma { pub size: c_int, pub red: *mut c_ushort, pub green: *mut c_ushort, pub blue: *mut c_ushort, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRCrtcTransformAttributes { pub pendingTransform: XTransform, pub pendingFilter: *mut c_char, pub pendingNparams: c_int, pub pendingParams: *mut XFixed, pub currentTransform: XTransform, pub currentFilter: *mut c_char, pub currentNparams: c_int, pub currentParams: *mut XFixed, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRPanning { pub timestamp: Time, pub left: c_uint, pub top: c_uint, pub width: c_uint, pub height: c_uint, pub track_left: c_uint, pub track_top: c_uint, pub track_width: c_uint, pub track_height: c_uint, pub border_left: c_int, pub border_top: c_int, pub border_right: c_int, pub border_bottom: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRProviderResources { pub timestamp: Time, pub nproviders: c_int, pub providers: *mut RRProvider, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRProviderInfo { pub capabilities: c_uint, pub ncrtcs: c_int, pub crtcs: *mut RRCrtc, pub noutputs: c_int, pub outputs: *mut RROutput, pub name: *mut c_char, pub nassociatedproviders: c_int, pub associated_providers: *mut RRProvider, pub associated_capability: *mut c_uint, pub nameLen: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRMonitorInfo { pub name: Atom, pub primary: Bool, pub automatic: Bool, pub noutput: c_int, pub x: c_int, pub y: c_int, pub width: c_int, pub height: c_int, pub mwidth: c_int, pub mheight: c_int, pub outputs: *mut RROutput, } // // event structures // #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRScreenChangeNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub root: Window, pub timestamp: Time, pub config_timestamp: Time, pub size_index: SizeID, pub subpixel_order: SubpixelOrder, pub rotation: Rotation, pub width: c_int, pub height: c_int, pub mwidth: c_int, pub mheight: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub subtype: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRROutputChangeNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub subtype: c_int, pub output: RROutput, pub crtc: RRCrtc, pub mode: RRMode, pub rotation: Rotation, pub connection: Connection, pub subpixel_order: SubpixelOrder, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRCrtcChangeNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub subtype: c_int, pub crtc: RRCrtc, pub mode: RRMode, pub rotation: Rotation, pub x: c_int, pub y: c_int, pub width: c_uint, pub height: c_uint, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRROutputPropertyNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub subtype: c_int, pub output: RROutput, pub property: Atom, pub timestamp: Time, pub state: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRProviderChangeNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub subtype: c_int, pub provider: RRProvider, pub timestamp: Time, pub current_role: c_uint, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRProviderPropertyNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub subtype: c_int, pub provider: RRProvider, pub property: Atom, pub timestamp: Time, pub state: c_int, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRRResourceChangeNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub subtype: c_int, pub timestamp: Time, } event_conversions_and_tests! { xrr_screen_change_notify: XRRScreenChangeNotifyEvent, xrr_notify: XRRNotifyEvent, xrr_output_change_notify: XRROutputChangeNotifyEvent, xrr_crtc_change_notify: XRRCrtcChangeNotifyEvent, xrr_output_property_notify: XRROutputPropertyNotifyEvent, xrr_provider_change_notify: XRRProviderChangeNotifyEvent, xrr_provider_property_notify: XRRProviderPropertyNotifyEvent, xrr_resource_change_notify: XRRResourceChangeNotifyEvent, } // // constants // pub const RANDR_NAME: &'static str = "RANDR"; pub const RANDR_MAJOR: c_int = 1; pub const RANDR_MINOR: c_int = 5; pub const RRNumberErrors: c_int = 4; pub const RRNumberEvents: c_int = 2; pub const RRNumberRequests: c_int = 45; pub const X_RRQueryVersion: c_int = 0; pub const X_RROldGetScreenInfo: c_int = 1; pub const X_RRSetScreenConfig: c_int = 2; pub const X_RROldScreenChangeSelectInput: c_int = 3; pub const X_RRSelectInput: c_int = 4; pub const X_RRGetScreenInfo: c_int = 5; pub const X_RRGetScreenSizeRange: c_int = 6; pub const X_RRSetScreenSize: c_int = 7; pub const X_RRGetScreenResources: c_int = 8; pub const X_RRGetOutputInfo: c_int = 9; pub const X_RRListOutputProperties: c_int = 10; pub const X_RRQueryOutputProperty: c_int = 11; pub const X_RRConfigureOutputProperty: c_int = 12; pub const X_RRChangeOutputProperty: c_int = 13; pub const X_RRDeleteOutputProperty: c_int = 14; pub const X_RRGetOutputProperty: c_int = 15; pub const X_RRCreateMode: c_int = 16; pub const X_RRDestroyMode: c_int = 17; pub const X_RRAddOutputMode: c_int = 18; pub const X_RRDeleteOutputMode: c_int = 19; pub const X_RRGetCrtcInfo: c_int = 20; pub const X_RRSetCrtcConfig: c_int = 21; pub const X_RRGetCrtcGammaSize: c_int = 22; pub const X_RRGetCrtcGamma: c_int = 23; pub const X_RRSetCrtcGamma: c_int = 24; pub const X_RRGetScreenResourcesCurrent: c_int = 25; pub const X_RRSetCrtcTransform: c_int = 26; pub const X_RRGetCrtcTransform: c_int = 27; pub const X_RRGetPanning: c_int = 28; pub const X_RRSetPanning: c_int = 29; pub const X_RRSetOutputPrimary: c_int = 30; pub const X_RRGetOutputPrimary: c_int = 31; pub const X_RRGetProviders: c_int = 32; pub const X_RRGetProviderInfo: c_int = 33; pub const X_RRSetProviderOffloadSink: c_int = 34; pub const X_RRSetProviderOutputSource: c_int = 35; pub const X_RRListProviderProperties: c_int = 36; pub const X_RRQueryProviderProperty: c_int = 37; pub const X_RRConfigureProviderProperty: c_int = 38; pub const X_RRChangeProviderProperty: c_int = 39; pub const X_RRDeleteProviderProperty: c_int = 40; pub const X_RRGetProviderProperty: c_int = 41; pub const X_RRGetMonitors: c_int = 42; pub const X_RRSetMonitor: c_int = 43; pub const X_RRDeleteMonitor: c_int = 44; pub const RRTransformUnit: c_int = 1 << 0; pub const RRTransformScaleUp: c_int = 1 << 1; pub const RRTransformScaleDown: c_int = 1 << 2; pub const RRTransformProjective: c_int = 1 << 3; pub const RRScreenChangeNotifyMask: c_int = 1 << 0; pub const RRCrtcChangeNotifyMask: c_int = 1 << 1; pub const RROutputChangeNotifyMask: c_int = 1 << 2; pub const RROutputPropertyNotifyMask: c_int = 1 << 3; pub const RRProviderChangeNotifyMask: c_int = 1 << 4; pub const RRProviderPropertyNotifyMask: c_int = 1 << 5; pub const RRResourceChangeNotifyMask: c_int = 1 << 6; pub const RRScreenChangeNotify: c_int = 0; pub const RRNotify: c_int = 1; pub const RRNotify_CrtcChange: c_int = 0; pub const RRNotify_OutputChange: c_int = 1; pub const RRNotify_OutputProperty: c_int = 2; pub const RRNotify_ProviderChange: c_int = 3; pub const RRNotify_ProviderProperty: c_int = 4; pub const RRNotify_ResourceChange: c_int = 5; pub const RR_Rotate_0: c_int = 1; pub const RR_Rotate_90: c_int = 2; pub const RR_Rotate_180: c_int = 4; pub const RR_Rotate_270: c_int = 8; pub const RR_Reflect_X: c_int = 16; pub const RR_Reflect_Y: c_int = 32; pub const RRSetConfigSuccess: c_int = 0; pub const RRSetConfigInvalidConfigTime: c_int = 1; pub const RRSetConfigInvalidTime: c_int = 2; pub const RRSetConfigFailed: c_int = 3; pub const RR_HSyncPositive: c_int = 0x00000001; pub const RR_HSyncNegative: c_int = 0x00000002; pub const RR_VSyncPositive: c_int = 0x00000004; pub const RR_VSyncNegative: c_int = 0x00000008; pub const RR_Interlace: c_int = 0x00000010; pub const RR_DoubleScan: c_int = 0x00000020; pub const RR_CSync: c_int = 0x00000040; pub const RR_CSyncPositive: c_int = 0x00000080; pub const RR_CSyncNegative: c_int = 0x00000100; pub const RR_HSkewPresent: c_int = 0x00000200; pub const RR_BCast: c_int = 0x00000400; pub const RR_PixelMultiplex: c_int = 0x00000800; pub const RR_DoubleClock: c_int = 0x00001000; pub const RR_ClockDivideBy2: c_int = 0x00002000; pub const RR_Connected: c_int = 0; pub const RR_Disconnected: c_int = 1; pub const RR_UnknownConnection: c_int = 2; pub const BadRROutput: c_int = 0; pub const BadRRCrtc: c_int = 1; pub const BadRRMode: c_int = 2; pub const BadRRProvider: c_int = 3; pub const RR_PROPERTY_BACKLIGHT: &'static str = "Backlight"; pub const RR_PROPERTY_RANDR_EDID: &'static str = "EDID"; pub const RR_PROPERTY_SIGNAL_FORMAT: &'static str = "SignalFormat"; pub const RR_PROPERTY_SIGNAL_PROPERTIES: &'static str = "SignalProperties"; pub const RR_PROPERTY_CONNECTOR_TYPE: &'static str = "ConnectorType"; pub const RR_PROPERTY_CONNECTOR_NUMBER: &'static str = "ConnectorNumber"; pub const RR_PROPERTY_COMPATIBILITY_LIST: &'static str = "CompatibilityList"; pub const RR_PROPERTY_CLONE_LIST: &'static str = "CloneList"; pub const RR_PROPERTY_BORDER: &'static str = "Border"; pub const RR_PROPERTY_BORDER_DIMENSIONS: &'static str = "BorderDimensions"; pub const RR_PROPERTY_GUID: &'static str = "GUID"; pub const RR_PROPERTY_RANDR_TILE: &'static str = "TILE"; pub const RR_Capability_None: c_int = 0; pub const RR_Capability_SourceOutput: c_int = 1; pub const RR_Capability_SinkOutput: c_int = 2; pub const RR_Capability_SourceOffload: c_int = 4; pub const RR_Capability_SinkOffload: c_int = 8; x11-2.18.2/src/xrecord.rs010064400017500001750000000073201361324422500132450ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::{ c_char, c_int, c_uchar, c_ulong, c_ushort, }; use ::xlib::{ Bool, Display, Time, XID, }; // // functions // x11_link! { Xf86vmode, xtst, ["libXtst.so.6", "libXtst.so"], 14, pub fn XRecordAllocRange () -> *mut XRecordRange, pub fn XRecordCreateContext (_6: *mut Display, _5: c_int, _4: *mut c_ulong, _3: c_int, _2: *mut *mut XRecordRange, _1: c_int) -> c_ulong, pub fn XRecordDisableContext (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XRecordEnableContext (_4: *mut Display, _3: c_ulong, _2: Option, _1: *mut c_char) -> c_int, pub fn XRecordEnableContextAsync (_4: *mut Display, _3: c_ulong, _2: Option, _1: *mut c_char) -> c_int, pub fn XRecordFreeContext (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XRecordFreeData (_1: *mut XRecordInterceptData) -> (), pub fn XRecordFreeState (_1: *mut XRecordState) -> (), pub fn XRecordGetContext (_3: *mut Display, _2: c_ulong, _1: *mut *mut XRecordState) -> c_int, pub fn XRecordIdBaseMask (_1: *mut Display) -> c_ulong, pub fn XRecordProcessReplies (_1: *mut Display) -> (), pub fn XRecordQueryVersion (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XRecordRegisterClients (_7: *mut Display, _6: c_ulong, _5: c_int, _4: *mut c_ulong, _3: c_int, _2: *mut *mut XRecordRange, _1: c_int) -> c_int, pub fn XRecordUnregisterClients (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: c_int) -> c_int, variadic: globals: } // // constants // pub const XRecordFromServerTime: c_int = 0x01; pub const XRecordFromClientTime: c_int = 0x02; pub const XRecordFromClientSequence: c_int = 0x04; pub const XRecordCurrentClients: c_ulong = 1; pub const XRecordFutureClients: c_ulong = 2; pub const XRecordAllClients: c_ulong = 3; pub const XRecordFromServer: c_int = 0; pub const XRecordFromClient: c_int = 1; pub const XRecordClientStarted: c_int = 2; pub const XRecordClientDied: c_int = 3; pub const XRecordStartOfData: c_int = 4; pub const XRecordEndOfData: c_int = 5; // // types // pub type XRecordClientSpec = c_ulong; pub type XRecordContext = c_ulong; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRecordClientInfo { pub client: XRecordClientSpec, pub nranges: c_ulong, pub ranges: *mut *mut XRecordRange, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRecordExtRange { pub ext_major: XRecordRange8, pub ext_minor: XRecordRange16, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRecordInterceptData { pub id_base: XID, pub server_time: Time, pub client_seq: c_ulong, pub category: c_int, pub client_swapped: Bool, pub data: *mut c_uchar, pub data_len: c_ulong, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRecordRange { pub core_requests: XRecordRange8, pub core_replies: XRecordRange8, pub ext_requests: XRecordExtRange, pub ext_replies: XRecordExtRange, pub delivered_events: XRecordRange8, pub device_events: XRecordRange8, pub errors: XRecordRange8, pub client_started: Bool, pub client_died: Bool, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRecordRange8 { pub first: c_uchar, pub last: c_uchar, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRecordRange16 { pub first: c_ushort, pub last: c_ushort, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRecordState { pub enabled: Bool, pub datum_flags: c_int, pub nclients: c_ulong, pub client_info: *mut *mut XRecordClientInfo, } x11-2.18.2/src/xrender.rs010064400017500001750000000374331361324422500132560ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::{ c_char, c_double, c_int, c_short, c_uint, c_ulong, c_ushort, }; use ::xlib::{ Atom, Bool, Colormap, Cursor, Display, Pixmap, Region, Visual, XID, XRectangle, }; // // functions // x11_link! { Xrender, xrender, ["libXrender.so.1", "libXrender.so"], 44, pub fn XRenderAddGlyphs (_7: *mut Display, _6: c_ulong, _5: *const c_ulong, _4: *const XGlyphInfo, _3: c_int, _2: *const c_char, _1: c_int) -> (), pub fn XRenderAddTraps (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: *const XTrap, _1: c_int) -> (), pub fn XRenderChangePicture (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: *const XRenderPictureAttributes) -> (), pub fn XRenderComposite (_13: *mut Display, _12: c_int, _11: c_ulong, _10: c_ulong, _9: c_ulong, _8: c_int, _7: c_int, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> (), pub fn XRenderCompositeDoublePoly (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_ulong, _8: *const XRenderPictFormat, _7: c_int, _6: c_int, _5: c_int, _4: c_int, _3: *const XPointDouble, _2: c_int, _1: c_int) -> (), pub fn XRenderCompositeString16 (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_ulong, _8: *const XRenderPictFormat, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const c_ushort, _1: c_int) -> (), pub fn XRenderCompositeString32 (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_ulong, _8: *const XRenderPictFormat, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const c_uint, _1: c_int) -> (), pub fn XRenderCompositeString8 (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_ulong, _8: *const XRenderPictFormat, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (), pub fn XRenderCompositeText16 (_11: *mut Display, _10: c_int, _9: c_ulong, _8: c_ulong, _7: *const XRenderPictFormat, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const XGlyphElt16, _1: c_int) -> (), pub fn XRenderCompositeText32 (_11: *mut Display, _10: c_int, _9: c_ulong, _8: c_ulong, _7: *const XRenderPictFormat, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const XGlyphElt32, _1: c_int) -> (), pub fn XRenderCompositeText8 (_11: *mut Display, _10: c_int, _9: c_ulong, _8: c_ulong, _7: *const XRenderPictFormat, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const XGlyphElt8, _1: c_int) -> (), pub fn XRenderCompositeTrapezoids (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: *const XRenderPictFormat, _4: c_int, _3: c_int, _2: *const XTrapezoid, _1: c_int) -> (), pub fn XRenderCompositeTriangles (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: *const XRenderPictFormat, _4: c_int, _3: c_int, _2: *const XTriangle, _1: c_int) -> (), pub fn XRenderCompositeTriFan (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: *const XRenderPictFormat, _4: c_int, _3: c_int, _2: *const XPointFixed, _1: c_int) -> (), pub fn XRenderCompositeTriStrip (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: *const XRenderPictFormat, _4: c_int, _3: c_int, _2: *const XPointFixed, _1: c_int) -> (), pub fn XRenderCreateAnimCursor (_3: *mut Display, _2: c_int, _1: *mut XAnimCursor) -> c_ulong, pub fn XRenderCreateConicalGradient (_5: *mut Display, _4: *const XConicalGradient, _3: *const c_int, _2: *const XRenderColor, _1: c_int) -> c_ulong, pub fn XRenderCreateCursor (_4: *mut Display, _3: c_ulong, _2: c_uint, _1: c_uint) -> c_ulong, pub fn XRenderCreateGlyphSet (_2: *mut Display, _1: *const XRenderPictFormat) -> c_ulong, pub fn XRenderCreateLinearGradient (_5: *mut Display, _4: *const XLinearGradient, _3: *const c_int, _2: *const XRenderColor, _1: c_int) -> c_ulong, pub fn XRenderCreatePicture (_5: *mut Display, _4: c_ulong, _3: *const XRenderPictFormat, _2: c_ulong, _1: *const XRenderPictureAttributes) -> c_ulong, pub fn XRenderCreateRadialGradient (_5: *mut Display, _4: *const XRadialGradient, _3: *const c_int, _2: *const XRenderColor, _1: c_int) -> c_ulong, pub fn XRenderCreateSolidFill (_2: *mut Display, _1: *const XRenderColor) -> c_ulong, pub fn XRenderFillRectangle (_8: *mut Display, _7: c_int, _6: c_ulong, _5: *const XRenderColor, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> (), pub fn XRenderFillRectangles (_6: *mut Display, _5: c_int, _4: c_ulong, _3: *const XRenderColor, _2: *const XRectangle, _1: c_int) -> (), pub fn XRenderFindFormat (_4: *mut Display, _3: c_ulong, _2: *const XRenderPictFormat, _1: c_int) -> *mut XRenderPictFormat, pub fn XRenderFindStandardFormat (_2: *mut Display, _1: c_int) -> *mut XRenderPictFormat, pub fn XRenderFindVisualFormat (_2: *mut Display, _1: *const Visual) -> *mut XRenderPictFormat, pub fn XRenderFreeGlyphs (_4: *mut Display, _3: c_ulong, _2: *const c_ulong, _1: c_int) -> (), pub fn XRenderFreeGlyphSet (_2: *mut Display, _1: c_ulong) -> (), pub fn XRenderFreePicture (_2: *mut Display, _1: c_ulong) -> (), pub fn XRenderParseColor (_3: *mut Display, _2: *mut c_char, _1: *mut XRenderColor) -> c_int, pub fn XRenderQueryExtension (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XRenderQueryFilters (_2: *mut Display, _1: c_ulong) -> *mut XFilters, pub fn XRenderQueryFormats (_1: *mut Display) -> c_int, pub fn XRenderQueryPictIndexValues (_3: *mut Display, _2: *const XRenderPictFormat, _1: *mut c_int) -> *mut XIndexValue, pub fn XRenderQuerySubpixelOrder (_2: *mut Display, _1: c_int) -> c_int, pub fn XRenderQueryVersion (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XRenderReferenceGlyphSet (_2: *mut Display, _1: c_ulong) -> c_ulong, pub fn XRenderSetPictureClipRectangles (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: *const XRectangle, _1: c_int) -> (), pub fn XRenderSetPictureClipRegion (_3: *mut Display, _2: c_ulong, _1: Region) -> (), pub fn XRenderSetPictureFilter (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: *mut c_int, _1: c_int) -> (), pub fn XRenderSetPictureTransform (_3: *mut Display, _2: c_ulong, _1: *mut XTransform) -> (), pub fn XRenderSetSubpixelOrder (_3: *mut Display, _2: c_int, _1: c_int) -> c_int, variadic: globals: } // // types // pub type Glyph = XID; pub type GlyphSet = XID; pub type PictFormat = XID; pub type Picture = XID; pub type XDouble = c_double; pub type XFixed = c_int; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XAnimCursor { pub cursor: Cursor, pub delay: c_ulong, } pub type XAnimCursor = _XAnimCursor; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XCircle { pub x: XFixed, pub y: XFixed, pub radius: XFixed, } pub type XCircle = _XCircle; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XConicalGradient { pub center: XPointFixed, pub angle: XFixed, } pub type XConicalGradient = _XConicalGradient; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XFilters { pub nfilter: c_int, pub filter: *mut *mut c_char, pub nalias: c_int, pub alias: *mut c_short, } pub type XFilters = _XFilters; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XGlyphElt8 { pub glyphset: GlyphSet, pub chars: *mut c_char, pub nchars: c_int, pub xOff: c_int, pub yOff: c_int, } pub type XGlyphElt8 = _XGlyphElt8; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XGlyphElt16 { pub glyphset: GlyphSet, pub chars: *mut c_ushort, pub nchars: c_int, pub xOff: c_int, pub yOff: c_int, } pub type XGlyphElt16 = _XGlyphElt16; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XGlyphElt32 { pub glyphset: GlyphSet, pub chars: *mut c_uint, pub nchars: c_int, pub xOff: c_int, pub yOff: c_int, } pub type XGlyphElt32 = _XGlyphElt32; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XGlyphInfo { pub width: c_ushort, pub height: c_ushort, pub x: c_short, pub y: c_short, pub xOff: c_short, pub yOff: c_short, } pub type XGlyphInfo = _XGlyphInfo; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XIndexValue { pub pixel: c_ulong, pub red: c_ushort, pub green: c_ushort, pub blue: c_ushort, pub alpha: c_ushort, } pub type XIndexValue = _XIndexValue; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XLinearGradient { pub p1: XPointFixed, pub p2: XPointFixed, } pub type XLinearGradient = _XLinearGradient; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XLineFixed { pub p1: XPointFixed, pub p2: XPointFixed, } pub type XLineFixed = _XLineFixed; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XPointDouble { pub x: XDouble, pub y: XDouble, } pub type XPointDouble = _XPointDouble; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XPointFixed { pub x: XFixed, pub y: XFixed, } pub type XPointFixed = _XPointFixed; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XRadialGradient { pub inner: XCircle, pub outer: XCircle, } pub type XRadialGradient = _XRadialGradient; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRenderColor { pub red: c_ushort, pub green: c_ushort, pub blue: c_ushort, pub alpha: c_ushort, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRenderDirectFormat { pub red: c_short, pub redMask: c_short, pub green: c_short, pub greenMask: c_short, pub blue: c_short, pub blueMask: c_short, pub alpha: c_short, pub alphaMask: c_short, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XRenderPictFormat { pub id: PictFormat, pub type_: c_int, pub depth: c_int, pub direct: XRenderDirectFormat, pub colormap: Colormap, } #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XRenderPictureAttributes { pub repeat: c_int, pub alpha_map: Picture, pub alpha_x_origin: c_int, pub alpha_y_origin: c_int, pub clip_x_origin: c_int, pub clip_y_origin: c_int, pub clip_mask: Pixmap, pub graphics_exposures: Bool, pub subwindow_mode: c_int, pub poly_edge: c_int, pub poly_mode: c_int, pub dither: Atom, pub component_alpha: Bool, } pub type XRenderPictureAttributes = _XRenderPictureAttributes; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XSpanFix { pub left: XFixed, pub right: XFixed, pub y: XFixed, } pub type XSpanFix = _XSpanFix; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XTrap { pub top: XSpanFix, pub bottom: XSpanFix, } pub type XTrap = _XTrap; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XTrapezoid { pub top: XFixed, pub bottom: XFixed, pub left: XLineFixed, pub right: XLineFixed, } pub type XTrapezoid = _XTrapezoid; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XTriangle { pub p1: XPointFixed, pub p2: XPointFixed, pub p3: XPointFixed, } pub type XTriangle = _XTriangle; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct _XTransform { pub matrix: [[XFixed; 3]; 3], } pub type XTransform = _XTransform; // // constants // // pict format mask pub const PictFormatID: c_ulong = 1 << 0; pub const PictFormatType: c_ulong = 1 << 1; pub const PictFormatDepth: c_ulong = 1 << 2; pub const PictFormatRed: c_ulong = 1 << 3; pub const PictFormatRedMask: c_ulong = 1 << 4; pub const PictFormatGreen: c_ulong = 1 << 5; pub const PictFormatGreenMask: c_ulong = 1 << 6; pub const PictFormatBlue: c_ulong = 1 << 7; pub const PictFormatBlueMask: c_ulong = 1 << 8; pub const PictFormatAlpha: c_ulong = 1 << 9; pub const PictFormatAlphaMask: c_ulong = 1 << 10; pub const PictFormatColormap: c_ulong = 1 << 11; // error codes pub const BadPictFormat: c_int = 0; pub const BadPicture: c_int = 1; pub const BadPictOp: c_int = 2; pub const BadGlyphSet: c_int = 3; pub const BadGlyph: c_int = 4; pub const RenderNumberErrors: c_int = BadGlyph + 1; // pict types pub const PictTypeIndexed: c_int = 0; pub const PictTypeDirect: c_int = 1; // ops pub const PictOpMinimum: c_int = 0; pub const PictOpClear: c_int = 0; pub const PictOpSrc: c_int = 1; pub const PictOpDst: c_int = 2; pub const PictOpOver: c_int = 3; pub const PictOpOverReverse: c_int = 4; pub const PictOpIn: c_int = 5; pub const PictOpInReverse: c_int = 6; pub const PictOpOut: c_int = 7; pub const PictOpOutReverse: c_int = 8; pub const PictOpAtop: c_int = 9; pub const PictOpAtopReverse: c_int = 10; pub const PictOpXor: c_int = 11; pub const PictOpAdd: c_int = 12; pub const PictOpSaturate: c_int = 13; pub const PictOpMaximum: c_int = 13; pub const PictOpDisjointMinimum: c_int = 0x10; pub const PictOpDisjointClear: c_int = 0x10; pub const PictOpDisjointSrc: c_int = 0x11; pub const PictOpDisjointDst: c_int = 0x12; pub const PictOpDisjointOver: c_int = 0x13; pub const PictOpDisjointOverReverse: c_int = 0x14; pub const PictOpDisjointIn: c_int = 0x15; pub const PictOpDisjointInReverse: c_int = 0x16; pub const PictOpDisjointOut: c_int = 0x17; pub const PictOpDisjointOutReverse: c_int = 0x18; pub const PictOpDisjointAtop: c_int = 0x19; pub const PictOpDisjointAtopReverse: c_int = 0x1a; pub const PictOpDisjointXor: c_int = 0x1b; pub const PictOpDisjointMaximum: c_int = 0x1b; pub const PictOpConjointMinimum: c_int = 0x20; pub const PictOpConjointClear: c_int = 0x20; pub const PictOpConjointSrc: c_int = 0x21; pub const PictOpConjointDst: c_int = 0x22; pub const PictOpConjointOver: c_int = 0x23; pub const PictOpConjointOverReverse: c_int = 0x24; pub const PictOpConjointIn: c_int = 0x25; pub const PictOpConjointInReverse: c_int = 0x26; pub const PictOpConjointOut: c_int = 0x27; pub const PictOpConjointOutReverse: c_int = 0x28; pub const PictOpConjointAtop: c_int = 0x29; pub const PictOpConjointAtopReverse: c_int = 0x2a; pub const PictOpConjointXor: c_int = 0x2b; pub const PictOpConjointMaximum: c_int = 0x2b; pub const PictOpBlendMinimum: c_int = 0x30; pub const PictOpMultiply: c_int = 0x30; pub const PictOpScreen: c_int = 0x31; pub const PictOpOverlay: c_int = 0x32; pub const PictOpDarken: c_int = 0x33; pub const PictOpLighten: c_int = 0x34; pub const PictOpColorDodge: c_int = 0x35; pub const PictOpColorBurn: c_int = 0x36; pub const PictOpHardLight: c_int = 0x37; pub const PictOpSoftLight: c_int = 0x38; pub const PictOpDifference: c_int = 0x39; pub const PictOpExclusion: c_int = 0x3a; pub const PictOpHSLHue: c_int = 0x3b; pub const PictOpHSLSaturation: c_int = 0x3c; pub const PictOpHSLColor: c_int = 0x3d; pub const PictOpHSLLuminosity: c_int = 0x3e; pub const PictOpBlendMaximum: c_int = 0x3e; // poly edge types pub const PolyEdgeSharp: c_int = 0; pub const PolyEdgeSmooth: c_int = 1; // poly modes pub const PolyModePrecise: c_int = 0; pub const PolyModeImprecise: c_int = 1; // picture attributes mask pub const CPRepeat: c_int = 1 << 0; pub const CPAlphaMap: c_int = 1 << 1; pub const CPAlphaXOrigin: c_int = 1 << 2; pub const CPAlphaYOrigin: c_int = 1 << 3; pub const CPClipXOrigin: c_int = 1 << 4; pub const CPClipYOrigin: c_int = 1 << 5; pub const CPClipMask: c_int = 1 << 6; pub const CPGraphicsExposure: c_int = 1 << 7; pub const CPSubwindowMode: c_int = 1 << 8; pub const CPPolyEdge: c_int = 1 << 9; pub const CPPolyMode: c_int = 1 << 10; pub const CPDither: c_int = 1 << 11; pub const CPComponentAlpha: c_int = 1 << 12; pub const CPLastBit: c_int = 12; // filter methods pub const FilterNearest: &'static str = "nearest"; pub const FilterBilinear: &'static str = "bilinear"; pub const FilterConvolution: &'static str = "convolution"; pub const FilterFast: &'static str = "fast"; pub const FilterGood: &'static str = "good"; pub const FilterBest: &'static str = "best"; // subpixel orders pub const SubPixelUnknown: c_int = 0; pub const SubPixelHorizontalRGB: c_int = 1; pub const SubPixelHorizontalBGR: c_int = 2; pub const SubPixelVerticalRGB: c_int = 3; pub const SubPixelVerticalBGR: c_int = 4; pub const SubPixelNone: c_int = 5; // repeat attributes pub const RepeatNone: c_int = 0; pub const RepeatNormal: c_int = 1; pub const RepeatPad: c_int = 2; pub const RepeatReflect: c_int = 3; x11-2.18.2/src/xss.rs010064400017500001750000000054441361324422500124210ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::{ c_int, c_uint, c_ulong }; use xlib::{ Atom, Bool, Display, Drawable, Status, Time, Visual, XEvent, XID, XSetWindowAttributes, Window }; // // functions // x11_link! { Xss, xscrnsaver, ["libXss.so.2", "libXss.so"], 11, pub fn XScreenSaverQueryExtension (_1: *mut Display, _2: *mut c_int, _3: *mut c_int) -> Bool, pub fn XScreenSaverQueryVersion (_1: *mut Display, _2: *mut c_int, _3: *mut c_int) -> Status, pub fn XScreenSaverAllocInfo () -> *mut XScreenSaverInfo, pub fn XScreenSaverQueryInfo (_1: *mut Display, _2: Drawable, _3: *mut XScreenSaverInfo) -> Status, pub fn XScreenSaverSelectInput (_1: *mut Display, _2: Drawable, _3: c_ulong) -> (), pub fn XScreenSaverSetAttributes (_1: *mut Display, _2: Drawable, _3: c_int, _4: c_int, _5: c_uint, _6: c_uint, _7: c_uint, _8: c_int, _9: c_uint, _10: *mut Visual, _11: c_ulong, _12: *mut XSetWindowAttributes) -> (), pub fn XScreenSaverUnsetAttributes (_1: *mut Display, _2: Drawable) -> (), pub fn XScreenSaverRegister (_1: *mut Display, _2: c_int, _3: XID, _4: Atom) -> Status, pub fn XScreenSaverUnregister (_1: *mut Display, _2: c_int) -> Status, pub fn XScreenSaverGetRegistered (_1: *mut Display, _2: c_int, _3: *mut XID, _4: *mut Atom) -> Status, pub fn XScreenSaverSuspend (_1: *mut Display, _2: Bool) -> (), variadic: globals: } // // types // #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XScreenSaverInfo { pub window: Window, pub state: c_int, pub kind: c_int, pub til_or_since: c_ulong, pub idle: c_ulong, pub eventMask: c_ulong, } // // event structures // #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] pub struct XScreenSaverNotifyEvent { pub type_: c_int, pub serial: c_ulong, pub send_event: Bool, pub display: *mut Display, pub window: Window, pub root: Window, pub state: c_int, pub kind: c_int, pub forced: Bool, pub time: Time, } event_conversions_and_tests! { xss_notify: XScreenSaverNotifyEvent, } // // constants // pub const ScreenSaverName: &'static str = "MIT-SCREEN-SAVER"; pub const ScreenSaverPropertyName: &'static str = "_MIT_SCREEN_SAVER_ID"; pub const ScreenSaverNotifyMask: c_ulong = 0x00000001; pub const ScreenSaverCycleMask: c_ulong = 0x00000002; pub const ScreenSaverMajorVersion: c_int = 1; pub const ScreenSaverMinorVersion: c_int = 1; pub const ScreenSaverOff: c_int = 0; pub const ScreenSaverOn: c_int = 1; pub const ScreenSaverCycle: c_int = 2; pub const ScreenSaverDisabled: c_int = 3; pub const ScreenSaverBlanked: c_int = 0; pub const ScreenSaverInternal: c_int = 1; pub const ScreenSaverExternal: c_int = 2; pub const ScreenSaverNotify: c_int = 0; pub const ScreenSaverNumberEvents: c_int = 1; x11-2.18.2/src/xt.rs010064400017500001750000001020131361324422500122250ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::{ c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, }; use ::xlib::{ Display, GC, Region, Screen, Visual, XEvent, XGCValues, _XrmHashBucketRec, XrmOptionDescList, XrmValue, XSelectionRequestEvent, XSetWindowAttributes, }; // // functions // x11_link! { Xt, xt, ["libXt.so.6", "libXt.so"], 300, pub fn XtAddActions (_2: *mut XtActionsRec, _1: c_uint) -> (), pub fn XtAddCallback (_4: Widget, _3: *const c_char, _2: Option, _1: *mut c_void) -> (), pub fn XtAddCallbacks (_3: Widget, _2: *const c_char, _1: XtCallbackList) -> (), pub fn XtAddConverter (_5: *const c_char, _4: *const c_char, _3: Option, _2: XtConvertArgList, _1: c_uint) -> (), pub fn XtAddEventHandler (_5: Widget, _4: c_ulong, _3: c_char, _2: Option, _1: *mut c_void) -> (), pub fn XtAddExposureToRegion (_2: *mut XEvent, _1: Region) -> (), pub fn XtAddGrab (_3: Widget, _2: c_char, _1: c_char) -> (), pub fn XtAddInput (_4: c_int, _3: *mut c_void, _2: Option, _1: *mut c_void) -> c_ulong, pub fn XtAddRawEventHandler (_5: Widget, _4: c_ulong, _3: c_char, _2: Option, _1: *mut c_void) -> (), pub fn XtAddSignal (_2: Option, _1: *mut c_void) -> c_ulong, pub fn XtAddTimeOut (_3: c_ulong, _2: Option, _1: *mut c_void) -> c_ulong, pub fn XtAddWorkProc (_2: Option c_char>, _1: *mut c_void) -> c_ulong, pub fn XtAllocateGC (_6: Widget, _5: c_uint, _4: c_ulong, _3: *mut XGCValues, _2: c_ulong, _1: c_ulong) -> GC, pub fn XtAppAddActionHook (_3: XtAppContext, _2: Option, _1: *mut c_void) -> *mut c_void, pub fn XtAppAddActions (_3: XtAppContext, _2: *mut XtActionsRec, _1: c_uint) -> (), pub fn XtAppAddBlockHook (_3: XtAppContext, _2: Option, _1: *mut c_void) -> c_ulong, pub fn XtAppAddConverter (_6: XtAppContext, _5: *const c_char, _4: *const c_char, _3: Option, _2: XtConvertArgList, _1: c_uint) -> (), pub fn XtAppAddInput (_5: XtAppContext, _4: c_int, _3: *mut c_void, _2: Option, _1: *mut c_void) -> c_ulong, pub fn XtAppAddSignal (_3: XtAppContext, _2: Option, _1: *mut c_void) -> c_ulong, pub fn XtAppAddTimeOut (_4: XtAppContext, _3: c_ulong, _2: Option, _1: *mut c_void) -> c_ulong, pub fn XtAppAddWorkProc (_3: XtAppContext, _2: Option c_char>, _1: *mut c_void) -> c_ulong, pub fn XtAppCreateShell (_6: *const c_char, _5: *const c_char, _4: WidgetClass, _3: *mut Display, _2: *mut Arg, _1: c_uint) -> Widget, pub fn XtAppError (_2: XtAppContext, _1: *const c_char) -> (), pub fn XtAppErrorMsg (_7: XtAppContext, _6: *const c_char, _5: *const c_char, _4: *const c_char, _3: *const c_char, _2: *mut *mut c_char, _1: *mut c_uint) -> (), pub fn XtAppGetErrorDatabase (_1: XtAppContext) -> *mut *mut _XrmHashBucketRec, pub fn XtAppGetErrorDatabaseText (_8: XtAppContext, _7: *const c_char, _6: *const c_char, _5: *const c_char, _4: *const c_char, _3: *mut c_char, _2: c_int, _1: *mut _XrmHashBucketRec) -> (), pub fn XtAppGetExitFlag (_1: XtAppContext) -> c_char, pub fn XtAppGetSelectionTimeout (_1: XtAppContext) -> c_ulong, pub fn XtAppInitialize (_9: *mut XtAppContext, _8: *const c_char, _7: XrmOptionDescList, _6: c_uint, _5: *mut c_int, _4: *mut *mut c_char, _3: *mut *mut c_char, _2: *mut Arg, _1: c_uint) -> Widget, pub fn XtAppLock (_1: XtAppContext) -> (), pub fn XtAppMainLoop (_1: XtAppContext) -> (), pub fn XtAppNextEvent (_2: XtAppContext, _1: *mut XEvent) -> (), pub fn XtAppPeekEvent (_2: XtAppContext, _1: *mut XEvent) -> c_char, pub fn XtAppPending (_1: XtAppContext) -> c_ulong, pub fn XtAppProcessEvent (_2: XtAppContext, _1: c_ulong) -> (), pub fn XtAppReleaseCacheRefs (_2: XtAppContext, _1: *mut *mut c_void) -> (), pub fn XtAppSetErrorHandler (_2: XtAppContext, _1: Option) -> Option, pub fn XtAppSetErrorMsgHandler (_2: XtAppContext, _1: Option) -> Option, pub fn XtAppSetExitFlag (_1: XtAppContext) -> (), pub fn XtAppSetFallbackResources (_2: XtAppContext, _1: *mut *mut c_char) -> (), pub fn XtAppSetSelectionTimeout (_2: XtAppContext, _1: c_ulong) -> (), pub fn XtAppSetTypeConverter (_8: XtAppContext, _7: *const c_char, _6: *const c_char, _5: Option c_char>, _4: XtConvertArgList, _3: c_uint, _2: c_int, _1: Option) -> (), pub fn XtAppSetWarningHandler (_2: XtAppContext, _1: Option) -> Option, pub fn XtAppSetWarningMsgHandler (_2: XtAppContext, _1: Option) -> Option, pub fn XtAppUnlock (_1: XtAppContext) -> (), pub fn XtAppWarning (_2: XtAppContext, _1: *const c_char) -> (), pub fn XtAppWarningMsg (_7: XtAppContext, _6: *const c_char, _5: *const c_char, _4: *const c_char, _3: *const c_char, _2: *mut *mut c_char, _1: *mut c_uint) -> (), pub fn XtAugmentTranslations (_2: Widget, _1: *mut _TranslationData) -> (), pub fn XtBuildEventMask (_1: Widget) -> c_ulong, pub fn XtCallAcceptFocus (_2: Widget, _1: *mut c_ulong) -> c_char, pub fn XtCallActionProc (_5: Widget, _4: *const c_char, _3: *mut XEvent, _2: *mut *mut c_char, _1: c_uint) -> (), pub fn XtCallbackExclusive (_3: Widget, _2: *mut c_void, _1: *mut c_void) -> (), pub fn XtCallbackNone (_3: Widget, _2: *mut c_void, _1: *mut c_void) -> (), pub fn XtCallbackNonexclusive (_3: Widget, _2: *mut c_void, _1: *mut c_void) -> (), pub fn XtCallbackPopdown (_3: Widget, _2: *mut c_void, _1: *mut c_void) -> (), pub fn XtCallbackReleaseCacheRef (_3: Widget, _2: *mut c_void, _1: *mut c_void) -> (), pub fn XtCallbackReleaseCacheRefList (_3: Widget, _2: *mut c_void, _1: *mut c_void) -> (), pub fn XtCallCallbackList (_3: Widget, _2: XtCallbackList, _1: *mut c_void) -> (), pub fn XtCallCallbacks (_3: Widget, _2: *const c_char, _1: *mut c_void) -> (), pub fn XtCallConverter (_7: *mut Display, _6: Option c_char>, _5: *mut XrmValue, _4: c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCalloc (_2: c_uint, _1: c_uint) -> *mut c_char, pub fn XtCancelSelectionRequest (_2: Widget, _1: c_ulong) -> (), pub fn XtChangeManagedSet (_6: *mut Widget, _5: c_uint, _4: Option, _3: *mut c_void, _2: *mut Widget, _1: c_uint) -> (), pub fn XtClass (_1: Widget) -> WidgetClass, pub fn XtCloseDisplay (_1: *mut Display) -> (), pub fn XtConfigureWidget (_6: Widget, _5: c_short, _4: c_short, _3: c_ushort, _2: c_ushort, _1: c_ushort) -> (), pub fn XtConvert (_5: Widget, _4: *const c_char, _3: *mut XrmValue, _2: *const c_char, _1: *mut XrmValue) -> (), pub fn XtConvertAndStore (_5: Widget, _4: *const c_char, _3: *mut XrmValue, _2: *const c_char, _1: *mut XrmValue) -> c_char, pub fn XtConvertCase (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: *mut c_ulong) -> (), pub fn XtCreateApplicationContext () -> XtAppContext, pub fn XtCreateApplicationShell (_4: *const c_char, _3: WidgetClass, _2: *mut Arg, _1: c_uint) -> Widget, pub fn XtCreateManagedWidget (_5: *const c_char, _4: WidgetClass, _3: Widget, _2: *mut Arg, _1: c_uint) -> Widget, pub fn XtCreatePopupShell (_5: *const c_char, _4: WidgetClass, _3: Widget, _2: *mut Arg, _1: c_uint) -> Widget, pub fn XtCreateSelectionRequest (_2: Widget, _1: c_ulong) -> (), pub fn XtCreateWidget (_5: *const c_char, _4: WidgetClass, _3: Widget, _2: *mut Arg, _1: c_uint) -> Widget, pub fn XtCreateWindow (_5: Widget, _4: c_uint, _3: *mut Visual, _2: c_ulong, _1: *mut XSetWindowAttributes) -> (), pub fn XtCvtColorToPixel (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtIntToBool (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtIntToBoolean (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtIntToColor (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtIntToFloat (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtIntToFont (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtIntToPixel (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtIntToPixmap (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtIntToShort (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtIntToUnsignedChar (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToAcceleratorTable (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToAtom (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToBool (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToBoolean (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToCommandArgArray (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToCursor (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToDimension (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToDirectoryString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToDisplay (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToFile (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToFloat (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToFont (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToFontSet (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToFontStruct (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToGravity (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToInitialState (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToInt (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToPixel (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToRestartStyle (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToShort (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToTranslationTable (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToUnsignedChar (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtCvtStringToVisual (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char, pub fn XtDatabase (_1: *mut Display) -> *mut _XrmHashBucketRec, pub fn XtDestroyApplicationContext (_1: XtAppContext) -> (), pub fn XtDestroyGC (_1: GC) -> (), pub fn XtDestroyWidget (_1: Widget) -> (), pub fn XtDirectConvert (_5: Option, _4: *mut XrmValue, _3: c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (), pub fn XtDisownSelection (_3: Widget, _2: c_ulong, _1: c_ulong) -> (), pub fn XtDispatchEvent (_1: *mut XEvent) -> c_char, pub fn XtDispatchEventToWidget (_2: Widget, _1: *mut XEvent) -> c_char, pub fn XtDisplay (_1: Widget) -> *mut Display, pub fn XtDisplayInitialize (_8: XtAppContext, _7: *mut Display, _6: *const c_char, _5: *const c_char, _4: XrmOptionDescList, _3: c_uint, _2: *mut c_int, _1: *mut *mut c_char) -> (), pub fn XtDisplayOfObject (_1: Widget) -> *mut Display, pub fn XtDisplayStringConversionWarning (_3: *mut Display, _2: *const c_char, _1: *const c_char) -> (), pub fn XtDisplayToApplicationContext (_1: *mut Display) -> XtAppContext, pub fn XtError (_1: *const c_char) -> (), pub fn XtErrorMsg (_6: *const c_char, _5: *const c_char, _4: *const c_char, _3: *const c_char, _2: *mut *mut c_char, _1: *mut c_uint) -> (), pub fn XtFindFile (_4: *const c_char, _3: Substitution, _2: c_uint, _1: Option c_char>) -> *mut c_char, pub fn XtFree (_1: *mut c_char) -> (), pub fn XtGetActionKeysym (_2: *mut XEvent, _1: *mut c_uint) -> c_ulong, pub fn XtGetActionList (_3: WidgetClass, _2: *mut *mut XtActionsRec, _1: *mut c_uint) -> (), pub fn XtGetApplicationNameAndClass (_3: *mut Display, _2: *mut *mut c_char, _1: *mut *mut c_char) -> (), pub fn XtGetApplicationResources (_6: Widget, _5: *mut c_void, _4: *mut XtResource, _3: c_uint, _2: *mut Arg, _1: c_uint) -> (), pub fn XtGetClassExtension (_5: WidgetClass, _4: c_uint, _3: c_int, _2: c_long, _1: c_uint) -> *mut c_void, pub fn XtGetConstraintResourceList (_3: WidgetClass, _2: *mut *mut XtResource, _1: *mut c_uint) -> (), pub fn XtGetDisplays (_3: XtAppContext, _2: *mut *mut *mut Display, _1: *mut c_uint) -> (), pub fn XtGetErrorDatabase () -> *mut *mut _XrmHashBucketRec, pub fn XtGetErrorDatabaseText (_6: *const c_char, _5: *const c_char, _4: *const c_char, _3: *const c_char, _2: *mut c_char, _1: c_int) -> (), pub fn XtGetGC (_3: Widget, _2: c_ulong, _1: *mut XGCValues) -> GC, pub fn XtGetKeyboardFocusWidget (_1: Widget) -> Widget, pub fn XtGetKeysymTable (_3: *mut Display, _2: *mut c_uchar, _1: *mut c_int) -> *mut c_ulong, pub fn XtGetMultiClickTime (_1: *mut Display) -> c_int, pub fn XtGetResourceList (_3: WidgetClass, _2: *mut *mut XtResource, _1: *mut c_uint) -> (), pub fn XtGetSelectionParameters (_7: Widget, _6: c_ulong, _5: *mut c_void, _4: *mut c_ulong, _3: *mut *mut c_void, _2: *mut c_ulong, _1: *mut c_int) -> (), pub fn XtGetSelectionRequest (_3: Widget, _2: c_ulong, _1: *mut c_void) -> *mut XSelectionRequestEvent, pub fn XtGetSelectionTimeout () -> c_ulong, pub fn XtGetSelectionValue (_6: Widget, _5: c_ulong, _4: c_ulong, _3: Option, _2: *mut c_void, _1: c_ulong) -> (), pub fn XtGetSelectionValueIncremental (_6: Widget, _5: c_ulong, _4: c_ulong, _3: Option, _2: *mut c_void, _1: c_ulong) -> (), pub fn XtGetSelectionValues (_7: Widget, _6: c_ulong, _5: *mut c_ulong, _4: c_int, _3: Option, _2: *mut *mut c_void, _1: c_ulong) -> (), pub fn XtGetSelectionValuesIncremental (_7: Widget, _6: c_ulong, _5: *mut c_ulong, _4: c_int, _3: Option, _2: *mut *mut c_void, _1: c_ulong) -> (), pub fn XtGetSubresources (_8: Widget, _7: *mut c_void, _6: *const c_char, _5: *const c_char, _4: *mut XtResource, _3: c_uint, _2: *mut Arg, _1: c_uint) -> (), pub fn XtGetSubvalues (_5: *mut c_void, _4: *mut XtResource, _3: c_uint, _2: *mut Arg, _1: c_uint) -> (), pub fn XtGetValues (_3: Widget, _2: *mut Arg, _1: c_uint) -> (), pub fn XtGrabButton (_9: Widget, _8: c_int, _7: c_uint, _6: c_char, _5: c_uint, _4: c_int, _3: c_int, _2: c_ulong, _1: c_ulong) -> (), pub fn XtGrabKey (_6: Widget, _5: c_uchar, _4: c_uint, _3: c_char, _2: c_int, _1: c_int) -> (), pub fn XtGrabKeyboard (_5: Widget, _4: c_char, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XtGrabPointer (_8: Widget, _7: c_char, _6: c_uint, _5: c_int, _4: c_int, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XtHasCallbacks (_2: Widget, _1: *const c_char) -> XtCallbackStatus, pub fn XtHooksOfDisplay (_1: *mut Display) -> Widget, pub fn XtInitialize (_6: *const c_char, _5: *const c_char, _4: XrmOptionDescList, _3: c_uint, _2: *mut c_int, _1: *mut *mut c_char) -> Widget, pub fn XtInitializeWidgetClass (_1: WidgetClass) -> (), pub fn XtInsertEventHandler (_6: Widget, _5: c_ulong, _4: c_char, _3: Option, _2: *mut c_void, _1: XtListPosition) -> (), pub fn XtInsertEventTypeHandler (_6: Widget, _5: c_int, _4: *mut c_void, _3: Option, _2: *mut c_void, _1: XtListPosition) -> (), pub fn XtInsertRawEventHandler (_6: Widget, _5: c_ulong, _4: c_char, _3: Option, _2: *mut c_void, _1: XtListPosition) -> (), pub fn XtInstallAccelerators (_2: Widget, _1: Widget) -> (), pub fn XtInstallAllAccelerators (_2: Widget, _1: Widget) -> (), pub fn XtIsApplicationShell (_1: Widget) -> c_char, pub fn XtIsComposite (_1: Widget) -> c_char, pub fn XtIsConstraint (_1: Widget) -> c_char, pub fn XtIsManaged (_1: Widget) -> c_char, pub fn XtIsObject (_1: Widget) -> c_char, pub fn XtIsOverrideShell (_1: Widget) -> c_char, pub fn XtIsRealized (_1: Widget) -> c_char, pub fn XtIsRectObj (_1: Widget) -> c_char, pub fn XtIsSensitive (_1: Widget) -> c_char, pub fn XtIsSessionShell (_1: Widget) -> c_char, pub fn XtIsShell (_1: Widget) -> c_char, pub fn XtIsSubclass (_2: Widget, _1: WidgetClass) -> c_char, pub fn XtIsTopLevelShell (_1: Widget) -> c_char, pub fn XtIsTransientShell (_1: Widget) -> c_char, pub fn XtIsVendorShell (_1: Widget) -> c_char, pub fn XtIsWidget (_1: Widget) -> c_char, pub fn XtIsWMShell (_1: Widget) -> c_char, pub fn XtKeysymToKeycodeList (_4: *mut Display, _3: c_ulong, _2: *mut *mut c_uchar, _1: *mut c_uint) -> (), pub fn XtLastEventProcessed (_1: *mut Display) -> *mut XEvent, pub fn XtLastTimestampProcessed (_1: *mut Display) -> c_ulong, pub fn XtMainLoop () -> (), pub fn XtMakeGeometryRequest (_3: Widget, _2: *mut XtWidgetGeometry, _1: *mut XtWidgetGeometry) -> XtGeometryResult, pub fn XtMakeResizeRequest (_5: Widget, _4: c_ushort, _3: c_ushort, _2: *mut c_ushort, _1: *mut c_ushort) -> XtGeometryResult, pub fn XtMalloc (_1: c_uint) -> *mut c_char, pub fn XtManageChild (_1: Widget) -> (), pub fn XtManageChildren (_2: *mut Widget, _1: c_uint) -> (), pub fn XtMapWidget (_1: Widget) -> (), pub fn XtMenuPopupAction (_4: Widget, _3: *mut XEvent, _2: *mut *mut c_char, _1: *mut c_uint) -> (), pub fn XtMergeArgLists (_4: *mut Arg, _3: c_uint, _2: *mut Arg, _1: c_uint) -> *mut Arg, pub fn XtMoveWidget (_3: Widget, _2: c_short, _1: c_short) -> (), pub fn XtName (_1: Widget) -> *mut c_char, pub fn XtNameToWidget (_2: Widget, _1: *const c_char) -> Widget, pub fn XtNewString (_1: *mut c_char) -> *mut c_char, pub fn XtNextEvent (_1: *mut XEvent) -> (), pub fn XtNoticeSignal (_1: c_ulong) -> (), pub fn XtOpenApplication (_10: *mut XtAppContext, _9: *const c_char, _8: XrmOptionDescList, _7: c_uint, _6: *mut c_int, _5: *mut *mut c_char, _4: *mut *mut c_char, _3: WidgetClass, _2: *mut Arg, _1: c_uint) -> Widget, pub fn XtOpenDisplay (_8: XtAppContext, _7: *const c_char, _6: *const c_char, _5: *const c_char, _4: XrmOptionDescList, _3: c_uint, _2: *mut c_int, _1: *mut *mut c_char) -> *mut Display, pub fn XtOverrideTranslations (_2: Widget, _1: *mut _TranslationData) -> (), pub fn XtOwnSelection (_6: Widget, _5: c_ulong, _4: c_ulong, _3: Option c_char>, _2: Option, _1: Option) -> c_char, pub fn XtOwnSelectionIncremental (_8: Widget, _7: c_ulong, _6: c_ulong, _5: Option c_char>, _4: Option, _3: Option, _2: Option, _1: *mut c_void) -> c_char, pub fn XtParent (_1: Widget) -> Widget, pub fn XtParseAcceleratorTable (_1: *const c_char) -> *mut _TranslationData, pub fn XtParseTranslationTable (_1: *const c_char) -> *mut _TranslationData, pub fn XtPeekEvent (_1: *mut XEvent) -> c_char, pub fn XtPending () -> c_char, pub fn XtPopdown (_1: Widget) -> (), pub fn XtPopup (_2: Widget, _1: XtGrabKind) -> (), pub fn XtPopupSpringLoaded (_1: Widget) -> (), pub fn XtProcessEvent (_1: c_ulong) -> (), pub fn XtProcessLock () -> (), pub fn XtProcessUnlock () -> (), pub fn XtQueryGeometry (_3: Widget, _2: *mut XtWidgetGeometry, _1: *mut XtWidgetGeometry) -> XtGeometryResult, pub fn XtRealizeWidget (_1: Widget) -> (), pub fn XtRealloc (_2: *mut c_char, _1: c_uint) -> *mut c_char, pub fn XtRegisterCaseConverter (_4: *mut Display, _3: Option, _2: c_ulong, _1: c_ulong) -> (), pub fn XtRegisterDrawable (_3: *mut Display, _2: c_ulong, _1: Widget) -> (), pub fn XtRegisterExtensionSelector (_5: *mut Display, _4: c_int, _3: c_int, _2: Option, _1: *mut c_void) -> (), pub fn XtRegisterGrabAction (_5: Option, _4: c_char, _3: c_uint, _2: c_int, _1: c_int) -> (), pub fn XtReleaseGC (_2: Widget, _1: GC) -> (), pub fn XtReleasePropertyAtom (_2: Widget, _1: c_ulong) -> (), pub fn XtRemoveActionHook (_1: *mut c_void) -> (), pub fn XtRemoveAllCallbacks (_2: Widget, _1: *const c_char) -> (), pub fn XtRemoveBlockHook (_1: c_ulong) -> (), pub fn XtRemoveCallback (_4: Widget, _3: *const c_char, _2: Option, _1: *mut c_void) -> (), pub fn XtRemoveCallbacks (_3: Widget, _2: *const c_char, _1: XtCallbackList) -> (), pub fn XtRemoveEventHandler (_5: Widget, _4: c_ulong, _3: c_char, _2: Option, _1: *mut c_void) -> (), pub fn XtRemoveEventTypeHandler (_5: Widget, _4: c_int, _3: *mut c_void, _2: Option, _1: *mut c_void) -> (), pub fn XtRemoveGrab (_1: Widget) -> (), pub fn XtRemoveInput (_1: c_ulong) -> (), pub fn XtRemoveRawEventHandler (_5: Widget, _4: c_ulong, _3: c_char, _2: Option, _1: *mut c_void) -> (), pub fn XtRemoveSignal (_1: c_ulong) -> (), pub fn XtRemoveTimeOut (_1: c_ulong) -> (), pub fn XtRemoveWorkProc (_1: c_ulong) -> (), pub fn XtReservePropertyAtom (_1: Widget) -> c_ulong, pub fn XtResizeWidget (_4: Widget, _3: c_ushort, _2: c_ushort, _1: c_ushort) -> (), pub fn XtResizeWindow (_1: Widget) -> (), pub fn XtResolvePathname (_8: *mut Display, _7: *const c_char, _6: *const c_char, _5: *const c_char, _4: *const c_char, _3: Substitution, _2: c_uint, _1: Option c_char>) -> *mut c_char, pub fn XtScreen (_1: Widget) -> *mut Screen, pub fn XtScreenDatabase (_1: *mut Screen) -> *mut _XrmHashBucketRec, pub fn XtScreenOfObject (_1: Widget) -> *mut Screen, pub fn XtSendSelectionRequest (_3: Widget, _2: c_ulong, _1: c_ulong) -> (), pub fn XtSessionGetToken (_1: Widget) -> XtCheckpointToken, pub fn XtSessionReturnToken (_1: XtCheckpointToken) -> (), pub fn XtSetErrorHandler (_1: Option) -> (), pub fn XtSetErrorMsgHandler (_1: Option) -> (), pub fn XtSetEventDispatcher (_3: *mut Display, _2: c_int, _1: Option c_char>) -> Option c_char>, pub fn XtSetKeyboardFocus (_2: Widget, _1: Widget) -> (), pub fn XtSetKeyTranslator (_2: *mut Display, _1: Option) -> (), pub fn XtSetLanguageProc (_3: XtAppContext, _2: Option *mut c_char>, _1: *mut c_void) -> Option *mut c_char>, pub fn XtSetMappedWhenManaged (_2: Widget, _1: c_char) -> (), pub fn XtSetMultiClickTime (_2: *mut Display, _1: c_int) -> (), pub fn XtSetSelectionParameters (_6: Widget, _5: c_ulong, _4: c_ulong, _3: *mut c_void, _2: c_ulong, _1: c_int) -> (), pub fn XtSetSelectionTimeout (_1: c_ulong) -> (), pub fn XtSetSensitive (_2: Widget, _1: c_char) -> (), pub fn XtSetSubvalues (_5: *mut c_void, _4: *mut XtResource, _3: c_uint, _2: *mut Arg, _1: c_uint) -> (), pub fn XtSetTypeConverter (_7: *const c_char, _6: *const c_char, _5: Option c_char>, _4: XtConvertArgList, _3: c_uint, _2: c_int, _1: Option) -> (), pub fn XtSetValues (_3: Widget, _2: *mut Arg, _1: c_uint) -> (), pub fn XtSetWarningHandler (_1: Option) -> (), pub fn XtSetWarningMsgHandler (_1: Option) -> (), pub fn XtSetWMColormapWindows (_3: Widget, _2: *mut Widget, _1: c_uint) -> (), pub fn XtStringConversionWarning (_2: *const c_char, _1: *const c_char) -> (), pub fn XtSuperclass (_1: Widget) -> WidgetClass, pub fn XtToolkitInitialize () -> (), pub fn XtToolkitThreadInitialize () -> c_char, pub fn XtTranslateCoords (_5: Widget, _4: c_short, _3: c_short, _2: *mut c_short, _1: *mut c_short) -> (), pub fn XtTranslateKey (_5: *mut Display, _4: c_uchar, _3: c_uint, _2: *mut c_uint, _1: *mut c_ulong) -> (), pub fn XtTranslateKeycode (_5: *mut Display, _4: c_uchar, _3: c_uint, _2: *mut c_uint, _1: *mut c_ulong) -> (), pub fn XtUngrabButton (_3: Widget, _2: c_uint, _1: c_uint) -> (), pub fn XtUngrabKey (_3: Widget, _2: c_uchar, _1: c_uint) -> (), pub fn XtUngrabKeyboard (_2: Widget, _1: c_ulong) -> (), pub fn XtUngrabPointer (_2: Widget, _1: c_ulong) -> (), pub fn XtUninstallTranslations (_1: Widget) -> (), pub fn XtUnmanageChild (_1: Widget) -> (), pub fn XtUnmanageChildren (_2: *mut Widget, _1: c_uint) -> (), pub fn XtUnmapWidget (_1: Widget) -> (), pub fn XtUnrealizeWidget (_1: Widget) -> (), pub fn XtUnregisterDrawable (_2: *mut Display, _1: c_ulong) -> (), pub fn XtWarning (_1: *const c_char) -> (), pub fn XtWarningMsg (_6: *const c_char, _5: *const c_char, _4: *const c_char, _3: *const c_char, _2: *mut *mut c_char, _1: *mut c_uint) -> (), pub fn XtWidgetToApplicationContext (_1: Widget) -> XtAppContext, pub fn XtWindow (_1: Widget) -> c_ulong, pub fn XtWindowOfObject (_1: Widget) -> c_ulong, pub fn XtWindowToWidget (_2: *mut Display, _1: c_ulong) -> Widget, variadic: pub fn XtAsprintf (_2: *mut *mut c_char, _1: *const c_char) -> c_uint, pub fn XtVaAppCreateShell (_4: *const c_char, _3: *const c_char, _2: WidgetClass, _1: *mut Display) -> Widget, pub fn XtVaAppInitialize (_7: *mut XtAppContext, _6: *const c_char, _5: XrmOptionDescList, _4: c_uint, _3: *mut c_int, _2: *mut *mut c_char, _1: *mut *mut c_char) -> Widget, pub fn XtVaCreateArgsList (_1: *mut c_void) -> *mut c_void, pub fn XtVaCreateManagedWidget (_3: *const c_char, _2: WidgetClass, _1: Widget) -> Widget, pub fn XtVaCreatePopupShell (_3: *const c_char, _2: WidgetClass, _1: Widget) -> Widget, pub fn XtVaCreateWidget (_3: *const c_char, _2: WidgetClass, _1: Widget) -> Widget, pub fn XtVaGetApplicationResources (_4: Widget, _3: *mut c_void, _2: *mut XtResource, _1: c_uint) -> (), pub fn XtVaGetSubresources (_6: Widget, _5: *mut c_void, _4: *const c_char, _3: *const c_char, _2: *mut XtResource, _1: c_uint) -> (), pub fn XtVaGetSubvalues (_3: *mut c_void, _2: *mut XtResource, _1: c_uint) -> (), pub fn XtVaGetValues (_1: Widget) -> (), pub fn XtVaOpenApplication (_8: *mut XtAppContext, _7: *const c_char, _6: XrmOptionDescList, _5: c_uint, _4: *mut c_int, _3: *mut *mut c_char, _2: *mut *mut c_char, _1: WidgetClass) -> Widget, pub fn XtVaSetSubvalues (_3: *mut c_void, _2: *mut XtResource, _1: c_uint) -> (), pub fn XtVaSetValues (_1: Widget) -> (), globals: } // // types // // TODO structs #[repr(C)] pub struct Arg; #[repr(C)] pub struct SubstitutionRec; #[repr(C)] pub struct _TranslationData; #[repr(C)] pub struct _WidgetClassRec; #[repr(C)] pub struct _WidgetRec; #[repr(C)] pub struct _XtActionsRec; #[repr(C)] pub struct _XtAppStruct; #[repr(C)] pub struct _XtCallbackRec; #[repr(C)] pub struct _XtCheckpointTokenRec; #[repr(C)] pub struct XtConvertArgRec; #[repr(C)] pub struct _XtResource; #[repr(C)] pub struct XtWidgetGeometry; // C enums pub type XtCallbackStatus = c_int; pub type XtGeometryResult = c_int; pub type XtGrabKind = c_int; pub type XtListPosition = c_int; #[allow(dead_code)] #[cfg(test)] #[repr(C)] enum TestEnum { Variant1, Variant2, } #[test] fn enum_size_test () { assert!(::std::mem::size_of::() == ::std::mem::size_of::()); } // struct typedefs pub type ArgList = *mut Arg; pub type Substitution = *mut SubstitutionRec; pub type Widget = *mut _WidgetRec; pub type WidgetClass = *mut _WidgetClassRec; pub type XtAccelerators = *mut _TranslationData; pub type XtActionList = *mut _XtActionsRec; pub type XtActionsRec = _XtActionsRec; pub type XtAppContext = *mut _XtAppStruct; pub type XtCallbackList = *mut _XtCallbackRec; pub type XtCallbackRec = _XtCallbackRec; pub type XtCheckpointToken = *mut _XtCheckpointTokenRec; pub type XtCheckpointTokenRec = _XtCheckpointTokenRec; pub type XtConvertArgList = *mut XtConvertArgRec; pub type XtResource = _XtResource; pub type XtResourceList = *mut _XtResource; pub type XtTranslations = *mut _TranslationData; x11-2.18.2/src/xtest.rs010064400017500001750000000035261361324422500127520ustar0000000000000000// x11-rs: Rust bindings for X11 libraries // The X11 libraries are available under the MIT license. // These bindings are public domain. use std::os::raw::{ c_int, c_uint, c_ulong, }; use ::xinput::XDevice; use ::xlib::{ Display, GC, Visual, }; // // functions // x11_link! { Xf86vmode, xtst, ["libXtst.so.6", "libXtst.so"], 15, pub fn XTestCompareCurrentCursorWithWindow (_2: *mut Display, _1: c_ulong) -> c_int, pub fn XTestCompareCursorWithWindow (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int, pub fn XTestDiscard (_1: *mut Display) -> c_int, pub fn XTestFakeButtonEvent (_4: *mut Display, _3: c_uint, _2: c_int, _1: c_ulong) -> c_int, pub fn XTestFakeDeviceButtonEvent (_7: *mut Display, _6: *mut XDevice, _5: c_uint, _4: c_int, _3: *mut c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XTestFakeDeviceKeyEvent (_7: *mut Display, _6: *mut XDevice, _5: c_uint, _4: c_int, _3: *mut c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XTestFakeDeviceMotionEvent (_7: *mut Display, _6: *mut XDevice, _5: c_int, _4: c_int, _3: *mut c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XTestFakeKeyEvent (_4: *mut Display, _3: c_uint, _2: c_int, _1: c_ulong) -> c_int, pub fn XTestFakeMotionEvent (_5: *mut Display, _4: c_int, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XTestFakeProximityEvent (_6: *mut Display, _5: *mut XDevice, _4: c_int, _3: *mut c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XTestFakeRelativeMotionEvent (_4: *mut Display, _3: c_int, _2: c_int, _1: c_ulong) -> c_int, pub fn XTestGrabControl (_2: *mut Display, _1: c_int) -> c_int, pub fn XTestQueryExtension (_5: *mut Display, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int, pub fn XTestSetGContextOfGC (_2: GC, _1: c_ulong) -> (), pub fn XTestSetVisualIDOfVisual (_2: *mut Visual, _1: c_ulong) -> (), variadic: globals: } x11-2.18.2/.cargo_vcs_info.json0000644000000001121361324630200116270ustar00{ "git": { "sha1": "9c0b9e5a097515f7b8eccec7d71c5fb749100784" } } x11-2.18.2/Cargo.lock0000644000000015161361324630200076130ustar00# This file is automatically @generated by Cargo. # It is not intended for manual editing. [[package]] name = "libc" version = "0.2.66" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "pkg-config" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "x11" version = "2.18.2" dependencies = [ "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] "checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677"