Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

40
vendor/x11-dl/src/dpms.rs vendored Normal file
View File

@@ -0,0 +1,40 @@
// 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 super::xlib::{Bool, Display, Status};
use super::xmd::{BOOL, CARD16};
//
// 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: &str = "DPMS";
pub const DPMSModeOn: CARD16 = 0;
pub const DPMSModeStandby: CARD16 = 1;
pub const DPMSModeSuspend: CARD16 = 2;
pub const DPMSModeOff: CARD16 = 3;

69
vendor/x11-dl/src/error.rs vendored Normal file
View File

@@ -0,0 +1,69 @@
// x11-rs: Rust bindings for X11 libraries
// The X11 libraries are available under the MIT license.
// These bindings are public domain.
use std::error::Error;
use std::fmt::{Display, Formatter};
//
// OpenError
//
#[derive(Clone, Debug)]
pub struct OpenError {
kind: OpenErrorKind,
detail: String,
}
impl OpenError {
pub fn detail(&self) -> &str {
self.detail.as_ref()
}
pub fn kind(&self) -> OpenErrorKind {
self.kind
}
pub fn new(kind: OpenErrorKind, detail: String) -> OpenError {
OpenError { kind, detail }
}
}
impl Display for OpenError {
fn fmt(&self, f: &mut Formatter) -> Result<(), ::std::fmt::Error> {
//try!(f.write_str(self.kind.as_str())); TEST Erle July 2020 (on dev branch)
f.write_str(self.kind.as_str())?;
if !self.detail.is_empty() {
f.write_str(" (")?;
f.write_str(self.detail.as_ref())?;
f.write_str(")")?;
}
Ok(())
}
}
impl Error for OpenError {
fn description(&self) -> &str {
self.kind.as_str()
}
}
//
// OpenErrorKind
//
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum OpenErrorKind {
Library,
Symbol,
}
impl OpenErrorKind {
pub fn as_str(self) -> &'static str {
match self {
OpenErrorKind::Library => "opening library failed",
OpenErrorKind::Symbol => "loading symbol failed",
}
}
}

231
vendor/x11-dl/src/glx.rs vendored Normal file
View File

@@ -0,0 +1,231 @@
// 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 super::xlib::{Display, XVisualInfo, XID};
//
// 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<unsafe extern "C" fn ()>,
pub fn glXGetProcAddressARB (_1: *const c_uchar) -> Option<unsafe extern "C" fn ()>,
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 = 0x0080;
// 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;
}

39
vendor/x11-dl/src/internal.rs vendored Normal file
View File

@@ -0,0 +1,39 @@
// 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<T: Sized>(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::<T>() {
if *((a_addr + i) as *const u8) != *((b_addr + i) as *const u8) {
return false;
}
}
true
}
pub unsafe fn transmute_union<I, O>(input: &I) -> O
where
I: Sized,
O: Sized,
{
let mut output: O = zeroed();
let copy_len = min(size_of::<I>(), size_of::<O>());
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);
}
output
}

1332
vendor/x11-dl/src/keysym.rs vendored Normal file

File diff suppressed because it is too large Load Diff

47
vendor/x11-dl/src/lib.rs vendored Normal file
View File

@@ -0,0 +1,47 @@
// 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(deref_nullptr)]
#![allow(clippy::missing_safety_doc)]
extern crate libc;
#[macro_use]
mod link;
mod internal;
pub mod error;
#[macro_use]
pub mod xlib;
pub mod dpms;
pub mod glx;
pub mod keysym;
pub mod sync;
pub mod xcursor;
pub mod xf86vmode;
pub mod xfixes;
pub mod xft;
pub mod xinerama;
pub mod xinput;
pub mod xinput2;
pub mod xlib_xcb;
pub mod xmd;
pub mod xmu;
pub mod xpresent;
pub mod xrecord;
pub mod xrender;
pub mod xshm;
pub mod xss;
pub mod xt;
pub mod xtest;
pub mod xrandr {
include!("xrandr.rs");
include!("old_xrandr.rs");
}

190
vendor/x11-dl/src/link.rs vendored Normal file
View File

@@ -0,0 +1,190 @@
// x11-rs: Rust bindings for X11 libraries
// The X11 libraries are available under the MIT license.
// These bindings are public domain.
use std::ffi::{CStr, CString};
use std::os::raw::{c_char, c_void};
use std::path::Path;
use super::error::{OpenError, OpenErrorKind};
include!(concat!(env!("OUT_DIR"), "/config.rs"));
//
// x11_link!
//
macro_rules! x11_link {
{ $struct_name:ident, $pkg_name:ident, [$($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,)*
} => {
#[allow(clippy::manual_non_exhaustive)]
pub struct $struct_name {
_private: (),
$(pub $fn_name: unsafe extern "C" fn ($($param_type),*) -> $ret_type,)*
$(pub $vfn_name: unsafe extern "C" fn ($($vparam_type),+, ...) -> $vret_type,)*
$(pub $var_name: *mut $var_type,)*
}
unsafe impl Send for $struct_name {}
unsafe impl Sync for $struct_name {}
impl $struct_name {
pub fn open () -> Result<$struct_name, $crate::error::OpenError> {
/// Cached function pointers and global variables for X11 libraries.
static CACHED: once_cell::sync::OnceCell<($crate::link::DynamicLibrary, $struct_name)> = once_cell::sync::OnceCell::new();
// Use the cached library or open a new one.
let (_, funcs) = CACHED.get_or_try_init(|| {
unsafe {
let libdir = $crate::link::config::libdir::$pkg_name;
let lib = $crate::link::DynamicLibrary::open_multi(libdir, &[$($lib_name),*])?;
// Load every function pointer.
let funcs = $struct_name {
_private: (),
$($fn_name: ::std::mem::transmute(lib.symbol(stringify!($fn_name))?),)*
$($vfn_name: ::std::mem::transmute(lib.symbol(stringify!($vfn_name))?),)*
$($var_name: ::std::mem::transmute(lib.symbol(stringify!($var_name))?),)*
};
Ok((lib, funcs))
}
})?;
Ok($struct_name {
_private: (),
$($fn_name: funcs.$fn_name,)*
$($vfn_name: funcs.$vfn_name,)*
$($var_name: funcs.$var_name,)*
})
}
}
};
}
//
// DynamicLibrary
//
pub struct DynamicLibrary {
handle: *mut c_void,
}
impl DynamicLibrary {
pub fn open(name: &str) -> Result<DynamicLibrary, OpenError> {
unsafe {
let cname = match CString::new(name) {
Ok(cname) => cname,
Err(_) => {
return Err(OpenError::new(
OpenErrorKind::Library,
String::from("library name contains NUL byte(s)"),
));
}
};
let handle = libc::dlopen(cname.as_ptr(), libc::RTLD_LAZY);
if handle.is_null() {
let msg = libc::dlerror();
if msg.is_null() {
return Err(OpenError::new(OpenErrorKind::Library, String::new()));
}
let cmsg = CStr::from_ptr(msg as *const c_char);
let detail = cmsg.to_string_lossy().into_owned();
return Err(OpenError::new(OpenErrorKind::Library, detail));
}
Ok(DynamicLibrary {
handle: handle as *mut c_void,
})
}
}
pub fn open_multi(
libdir: Option<&'static str>,
names: &[&str],
) -> Result<DynamicLibrary, OpenError> {
assert!(!names.is_empty());
let paths = libdir.map_or(Vec::new(), |dir| {
let path = Path::new(dir);
names
.iter()
.map(|name| path.join(name).to_str().unwrap().to_string())
.collect::<Vec<_>>()
});
let mut msgs = Vec::new();
for name in names.iter().copied().chain(paths.iter().map(|x| &**x)) {
match DynamicLibrary::open(name) {
Ok(lib) => {
return Ok(lib);
}
Err(err) => {
msgs.push(format!("{}", err));
}
}
}
let mut detail = String::new();
for (i, msg) in msgs.iter().enumerate() {
if i != 0 {
detail.push_str("; ");
}
detail.push_str(msg.as_ref());
}
Err(OpenError::new(OpenErrorKind::Library, detail))
}
pub fn symbol(&self, name: &str) -> Result<*mut c_void, OpenError> {
unsafe {
let cname = match CString::new(name) {
Ok(cname) => cname,
Err(_) => {
return Err(OpenError::new(
OpenErrorKind::Symbol,
String::from("symbol name contains NUL byte(s)"),
));
}
};
let sym = libc::dlsym(self.handle as *mut _, cname.as_ptr());
if sym.is_null() {
let msg = libc::dlerror();
if msg.is_null() {
return Err(OpenError::new(OpenErrorKind::Symbol, String::from(name)));
}
let cmsg = CStr::from_ptr(msg as *const c_char);
let detail = format!("{} - {}", name, cmsg.to_string_lossy().into_owned());
return Err(OpenError::new(OpenErrorKind::Symbol, detail));
}
Ok(sym as *mut c_void)
}
}
}
impl Drop for DynamicLibrary {
fn drop (&mut self) {
unsafe {
libc::dlclose(self.handle as *mut _);
}
}
}
unsafe impl Send for DynamicLibrary {}
unsafe impl Sync for DynamicLibrary {}

73
vendor/x11-dl/src/old_xrandr.rs vendored Normal file
View File

@@ -0,0 +1,73 @@
// x11-rs: Rust bindings for X11 libraries
// The X11 libraries are available under the MIT license.
// These bindings are public domain.
x11_link! { Xrandr_2_2_0, xrandr, ["libXrandr.so.2.2.0", "libXrandr.so.2", "libXrandr.so"], 65,
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 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 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 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 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 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:
}

192
vendor/x11-dl/src/sync.rs vendored Normal file
View File

@@ -0,0 +1,192 @@
// 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};
use crate::xlib::{Bool, Display, Drawable, Status, Time, XID};
//
// functions
//
x11_link! { Xext, xext, ["libXext.so.6", "libXext.so"], 38,
pub fn XSyncQueryExtension(dpy: *mut Display, event_base: *mut c_int, error_base: *mut c_int) -> Status,
pub fn XSyncInitialize(dpy: *mut Display, major_version: *mut c_int, minor_version: *mut c_int) -> Status,
pub fn XSyncListSystemCounters(dpy: *mut Display, n_counters: *mut c_int) -> *mut XSyncSystemCounter,
pub fn XSyncFreeSystemCounterList(list: *mut XSyncSystemCounter) -> (),
pub fn XSyncCreateCounter(dpy: *mut Display, initial_value: XSyncValue) -> XSyncCounter,
pub fn XSyncSetCounter(dpy: *mut Display, counter: XSyncCounter, value: XSyncValue) -> Status,
pub fn XSyncChangeCounter(dpy: *mut Display, counter: XSyncCounter, value: XSyncValue) -> Status,
pub fn XSyncDestroyCounter(dpy: *mut Display, value: XSyncCounter) -> Status,
pub fn XSyncQueryCounter(dpy: *mut Display, counter: XSyncCounter, value: *mut XSyncValue) -> Status,
pub fn XSyncAwait(dpy: *mut Display, wait_list: *mut XSyncWaitCondition, n_conditions: c_int) -> Status,
pub fn XSyncCreateAlarm(dpy: *mut Display, values_mask: c_ulong, values: *mut XSyncAlarmAttributes) -> XSyncAlarm,
pub fn XSyncDestroyAlarm(dpy: *mut Display, alarm: XSyncAlarm) -> Status,
pub fn XSyncQueryAlarm(dpy: *mut Display, alarm: XSyncAlarm, values: *mut XSyncAlarmAttributes) -> Status,
pub fn XSyncChangeAlarm(dpy: *mut Display, alarm: XSyncAlarm, values_mask: c_ulong, values: *mut XSyncAlarmAttributes) -> Status,
pub fn XSyncSetPriority(dpy: *mut Display, client_resource_id: XID, priority: c_int) -> Status,
pub fn XSyncGetPriority(dpy: *mut Display, client_resource_id: XID, priority: *mut c_int) -> Status,
pub fn XSyncCreateFence(dpy: *mut Display, d: Drawable, initially_triggered: Bool) -> XSyncFence,
pub fn XSyncTriggerFence(dpy: *mut Display, fence: XSyncFence) -> Bool,
pub fn XSyncResetFence(dpy: *mut Display, fence: XSyncFence) -> Bool,
pub fn XSyncDestroyFence(dpy: *mut Display, fence: XSyncFence) -> Bool,
pub fn XSyncQueryFence(dpy: *mut Display, fence: XSyncFence, triggered: *mut Bool) -> Bool,
pub fn XSyncAwaitFence(dpy: *mut Display, fence_list: *const XSyncFence, n_fences: c_int) -> Bool,
pub fn XSyncIntToValue(pv: *mut XSyncValue, i: c_int) -> (),
pub fn XSyncIntsToValue(pv: *mut XSyncValue, l: c_uint, h: c_int) -> (),
pub fn XSyncValueGreaterThan(a: XSyncValue, b: XSyncValue) -> Bool,
pub fn XSyncValueLessThan(a: XSyncValue, b: XSyncValue) -> Bool,
pub fn XSyncValueGreaterOrEqual(a: XSyncValue, b: XSyncValue) -> Bool,
pub fn XSyncValueLessOrEqual(a: XSyncValue, b: XSyncValue) -> Bool,
pub fn XSyncValueEqual(a: XSyncValue, b: XSyncValue) -> Bool,
pub fn XSyncValueIsNegative(v: XSyncValue) -> Bool,
pub fn XSyncValueIsZero(v: XSyncValue) -> Bool,
pub fn XSyncValueIsPositive(v: XSyncValue) -> Bool,
pub fn XSyncValueLow32(v: XSyncValue) -> c_uint,
pub fn XSyncValueHigh32(v: XSyncValue) -> c_int,
pub fn XSyncValueAdd(presult: *mut XSyncValue, a: XSyncValue, b: XSyncValue, poverflow: *mut c_int) -> (),
pub fn XSyncValueSubtract(presult: *mut XSyncValue, a: XSyncValue, b: XSyncValue, poverflow: *mut c_int) -> (),
pub fn XSyncMaxValue(pv: *mut XSyncValue) -> (),
pub fn XSyncMinValue(pv: *mut XSyncValue) -> (),
variadic:
globals:
}
//
// types
//
pub type XSyncValueType = c_uint;
pub type XSyncTestType = c_uint;
pub type XSyncAlarmState = c_uint;
pub type XSyncCounter = XID;
pub type XSyncAlarm = XID;
pub type XSyncFence = XID;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XSyncAlarmError {
pub type_: c_int,
pub display: *mut Display,
pub alarm: XSyncAlarm,
pub serial: c_ulong,
pub error_code: c_uchar,
pub request_code: c_uchar,
pub minor_code: c_uchar,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XSyncCounterError {
pub type_: c_int,
pub display: *mut Display,
pub counter: XSyncCounter,
pub serial: c_ulong,
pub error_code: c_uchar,
pub request_code: c_uchar,
pub minor_code: c_uchar,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XSyncValue {
pub hi: c_int,
pub lo: c_uint,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XSyncTrigger {
pub counter: XSyncCounter,
pub value_type: XSyncValueType,
pub wait_value: XSyncValue,
pub test_type: XSyncTestType,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XSyncWaitCondition {
pub trigger: XSyncTrigger,
pub event_threshold: XSyncValue,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XSyncAlarmAttributes {
pub trigger: XSyncTrigger,
pub delta: XSyncValue,
pub events: Bool,
pub state: XSyncAlarmState,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XSyncCounterNotifyEvent {
pub type_: c_int,
pub serial: c_ulong,
pub send_event: Bool,
pub display: *mut Display,
pub counter: XSyncCounter,
pub wait_value: XSyncValue,
pub counter_value: XSyncValue,
pub time: Time,
pub count: c_int,
pub destroyed: Bool,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XSyncAlarmNotifyEvent {
pub type_: c_int,
pub serial: c_ulong,
pub send_event: Bool,
pub display: *mut Display,
pub alarm: XSyncAlarm,
pub counter_value: XSyncValue,
pub alarm_value: XSyncValue,
pub time: Time,
pub state: XSyncAlarmState,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XSyncSystemCounter {
pub name: *mut c_char,
pub counter: XSyncCounter,
pub resolution: XSyncValue,
}
//
// constants
//
pub const SYNC_NAME: &str = "SYNC";
pub const SYNC_MAJOR_VERSION: c_int = 3;
pub const SYNC_MINOR_VERSION: c_int = 1;
pub const XSyncCounterNotify: c_long = 0;
pub const XSyncAlarmNotify: c_long = 1;
pub const XSyncAlarmNotifyMask: c_long = 1 << XSyncAlarmNotify;
pub const XSyncNumberEvents: c_long = 2;
pub const XSyncBadCounter: c_long = 0;
pub const XSyncBadAlarm: c_long = 1;
pub const XSyncBadFence: c_long = 2;
pub const XSyncNumberErrors: c_long = XSyncBadFence + 1;
pub const XSyncCACounter: c_long = 1 << 0;
pub const XSyncCAValueType: c_long = 1 << 1;
pub const XSyncCAValue: c_long = 1 << 2;
pub const XSyncCATestType: c_long = 1 << 3;
pub const XSyncCADelta: c_long = 1 << 4;
pub const XSyncCAEvents: c_long = 1 << 5;
pub const XSyncValueType_XSyncAbsolute: XSyncValueType = 0;
pub const XSyncValueType_XSyncRelative: XSyncValueType = 1;
pub const XSyncTestType_XSyncPositiveTransition: XSyncTestType = 0;
pub const XSyncTestType_XSyncNegativeTransition: XSyncTestType = 1;
pub const XSyncTestType_XSyncPositiveComparison: XSyncTestType = 2;
pub const XSyncTestType_XSyncNegativeComparison: XSyncTestType = 3;
pub const XSyncAlarmState_XSyncAlarmActive: XSyncAlarmState = 0;
pub const XSyncAlarmState_XSyncAlarmInactive: XSyncAlarmState = 1;
pub const XSyncAlarmState_XSyncAlarmDestroyed: XSyncAlarmState = 2;

194
vendor/x11-dl/src/xcursor.rs vendored Normal file
View File

@@ -0,0 +1,194 @@
// x11-rs: Rust bindings for X11 libraries
// The X11 libraries are available under the MIT license.
// These bindings are public domain.
use libc::FILE;
use std::os::raw::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void};
use crate::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<unsafe extern "C" fn(*mut XcursorFile, *mut c_uchar, c_int) -> c_int>,
pub write: Option<unsafe extern "C" fn(*mut XcursorFile, *mut c_uchar, c_int) -> c_int>,
pub seek: Option<unsafe extern "C" fn(*mut XcursorFile, c_long, c_int) -> 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;

126
vendor/x11-dl/src/xf86vmode.rs vendored Normal file
View File

@@ -0,0 +1,126 @@
// 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 super::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,
}

105
vendor/x11-dl/src/xfixes.rs vendored Normal file
View File

@@ -0,0 +1,105 @@
// x11-rs: Rust bindings for X11 libraries
// The X11 libraries are available under the MIT license.
// These bindings are public domain.
use super::xlib::{Atom, Bool, Cursor, Display, Pixmap, Status, Time, Window, XRectangle, GC, XID};
use libc::{c_char, c_int, c_short, c_uint, c_ulong, c_ushort};
//
// functions
//
x11_link! { Xlib, x11, ["libXfixes.so.3", "libXfixes.so"], 35,
pub fn XFixesQueryExtension(dpy: *mut Display, event_base: *mut c_int, error_base: *mut c_int) -> Bool,
pub fn XFixesQueryVersion(dpy: *mut Display, major_version: *mut c_int, minor_version: *const c_int) -> Status,
pub fn XFixesVersion() -> c_int,
pub fn XFixesChangeSaveSet(dpy: *mut Display, win: Window, mode: c_int, target: c_int, map: c_int) -> (),
pub fn XFixesSelectSelectionInput(dpy: *mut Display, win: Window, selection: Atom, event_mask: c_ulong) -> (),
pub fn XFixesSelectCursorInput(dpy: Display, win: Window, event_mask: c_ulong) -> (),
pub fn XFixesGetCursorImage(dpy: *mut Display) -> *mut XFixesCursorImage,
pub fn XFixesCreateRegion(dpy: *mut Display, rectangles: *mut XRectangle, nrectangles: c_int) -> XserverRegion,
pub fn XFixesCreateRegionFromBitmap(dpy: *mut Display, bitmap: Pixmap) -> XserverRegion,
pub fn XFixesCreateRegionFromWindow(dpy: *mut Display, win: Window, kind: c_int) -> XserverRegion,
pub fn XFixesCreateRegionFromGC(dpy: *mut Display, gc: GC) -> XserverRegion,
pub fn XFixesCreateRegionFromPicture(dpy: *mut Display, picture: XID) -> XserverRegion,
pub fn XFixesDestroyRegion(dpy: *mut Display, region: XserverRegion) -> (),
pub fn XFixesSetRegion(dpy: *mut Display, region: XserverRegion, rectangles: *mut XRectangle, nrectangles: c_int) -> (),
pub fn XFixesCopyRegion(dpy: *mut Display, dst: XserverRegion, src: XserverRegion) -> (),
pub fn XFixesUnionRegion(dpy: *mut Display, dst: XserverRegion, src1: XserverRegion, src2: XserverRegion) -> (),
pub fn XFixesIntersectRegion(dpy: *mut Display, dst: XserverRegion, src1: XserverRegion, src2: XserverRegion) -> (),
pub fn XFixesSubtractRegion(dpy: *mut Display, dst: XserverRegion, src1: XserverRegion, src2: XserverRegion) -> (),
pub fn XFixesInvertRegion(dpy: *mut Display, dst: XserverRegion, rect: *mut XRectangle, src: XserverRegion) -> (),
pub fn XFixesTranslateRegion(dpy: *mut Display, region: XserverRegion, dx: c_int, dy: c_int) -> (),
pub fn XFixesRegionExtents(dpy: *mut Display, dst: XserverRegion, src: XserverRegion) -> (),
pub fn XFixesFetchRegion(dpy: *mut Display, region: XserverRegion, nrectangles: *mut c_int) -> *mut XRectangle,
pub fn XFixesFetchRegionAndBounds(dpy: *mut Display, region: XserverRegion, nrectangles: *mut c_int, bounds: *mut XRectangle) -> *mut XRectangle,
pub fn XFixesSetGCClipRegion(dpy: *mut Display, gc: GC, clip_x_origin: c_int, clip_y_origin: c_int, region: XserverRegion) -> (),
pub fn XFixesSetWindowShapeRegion(dpy: *mut Display, win: Window, shape_kind: c_int, x_off: c_int, y_off: c_int, region: XserverRegion) -> (),
pub fn XFixesSetPictureClipRegion(dpy: *mut Display, picture: XID, clip_x_origin: c_int, clip_y_origin: c_int, region: XserverRegion) -> (),
pub fn XFixesSetCursorName(dpy: *mut Display, cursor: Cursor, name: *const c_char) -> (),
pub fn XFixesGetCursorName(dpy: *mut Display, cursor: Cursor, atom: *mut Atom) -> *const c_char,
pub fn XFixesChangeCursor(dpy: *mut Display, source: Cursor, destination: Cursor) -> (),
pub fn XFixesChangeCursorByName(dpy: *mut Display, source: Cursor, name: *const c_char) -> (),
pub fn XFixesExpandRegion(dpy: *mut Display, dst: XserverRegion, src: XserverRegion, left: c_uint, right: c_uint, top: c_uint, bottom: c_uint) -> (),
pub fn XFixesHideCursor(dpy: *mut Display, win: Window) -> (),
pub fn XFixesShowCursor(dpy: *mut Display, win: Window) -> (),
pub fn XFixesCreatePointerBarrier(dpy: *mut Display, w: Window, x1: c_int, y1: c_int, x2: c_int, y2: c_int, directions: c_int, num_devices: c_int, devices: *mut c_int) -> PointerBarrier,
pub fn XFixesDestroyPointerBarrier(dpy: *mut Display, b: PointerBarrier) -> (),
variadic:
globals:
}
//
// types
//
pub type PointerBarrier = XID;
pub type XserverRegion = XID;
//
// structs
//
#[derive(Debug, Clone, Copy, PartialEq)]
#[repr(C)]
pub struct XFixesSelectionNotifyEvent {
pub _type: c_int,
pub serial: c_ulong,
pub send_event: Bool,
pub display: *mut Display,
pub window: Window,
pub subtype: c_int,
pub owner: Window,
pub selection: Atom,
pub timestamp: Time,
pub selection_timestamp: Time,
}
#[derive(Debug, Clone, Copy, PartialEq)]
#[repr(C)]
pub struct XFixesCursorNotifyEvent {
pub _type: c_int,
pub serial: c_ulong,
pub send_event: Bool,
pub display: *mut Display,
pub window: Window,
pub subtype: c_int,
pub cursor_serial: c_ulong,
pub timestamp: Time,
pub cursor_name: Atom,
}
#[derive(Debug, Clone, Copy, PartialEq)]
#[repr(C)]
pub struct XFixesCursorImage {
pub x: c_short,
pub y: c_short,
pub width: c_ushort,
pub height: c_ushort,
pub xhot: c_ushort,
pub yhot: c_ushort,
pub cursor_serial: c_ulong,
pub pixels: *mut c_ulong,
pub atom: Atom,
pub name: *const c_char,
}

220
vendor/x11-dl/src/xft.rs vendored Normal file
View File

@@ -0,0 +1,220 @@
// 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 super::xlib::{Display, Region, Visual, XRectangle};
use super::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: &str = "family";
pub const XFT_STYLE: &str = "style";
pub const XFT_SLANT: &str = "slant";
pub const XFT_WEIGHT: &str = "weight";
pub const XFT_SIZE: &str = "size";
pub const XFT_PIXEL_SIZE: &str = "pixelsize";
pub const XFT_SPACING: &str = "spacing";
pub const XFT_FOUNDRY: &str = "foundry";
pub const XFT_ANTIALIAS: &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;

52
vendor/x11-dl/src/xinerama.rs vendored Normal file
View File

@@ -0,0 +1,52 @@
// 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 super::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,
}

148
vendor/x11-dl/src/xinput.rs vendored Normal file
View File

@@ -0,0 +1,148 @@
// 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 super::xlib::{Atom, Display, Time, XEvent, XModifierKeymap, XID};
//
// 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,
}

870
vendor/x11-dl/src/xinput2.rs vendored Normal file
View File

@@ -0,0 +1,870 @@
use super::xfixes::PointerBarrier;
use super::xlib::{Atom, Display, Time, Window};
use std::os::raw::{c_double, c_int, c_long, c_uchar, c_uint, c_ulong};
//
// 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() }
}
}

3568
vendor/x11-dl/src/xlib.rs vendored Normal file

File diff suppressed because it is too large Load Diff

16
vendor/x11-dl/src/xlib_xcb.rs vendored Normal file
View File

@@ -0,0 +1,16 @@
use super::xlib::Display;
use std::os::raw::c_void;
x11_link! { Xlib_xcb, xlib_xcb, ["libX11-xcb.so.1", "libX11-xcb.so"], 2,
pub fn XGetXCBConnection(_1: *mut Display) -> *mut xcb_connection_t,
pub fn XSetEventQueueOwner(_1: *mut Display, _2: XEventQueueOwner) -> (),
variadic:
globals:
}
pub enum XEventQueueOwner {
XlibOwnsEventQueue = 0,
XCBOwnsEventQueue = 1,
}
pub type xcb_connection_t = c_void;

12
vendor/x11-dl/src/xmd.rs vendored Normal file
View File

@@ -0,0 +1,12 @@
pub 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;

182
vendor/x11-dl/src/xmu.rs vendored Normal file
View File

@@ -0,0 +1,182 @@
// x11-rs: Rust bindings for X11 libraries
// The X11 libraries are available under the MIT license.
// These bindings are public domain.
use libc::FILE;
use std::os::raw::{c_char, c_int, c_uchar, c_uint, c_ulong, c_void};
use super::xlib::{
Display, Screen, XColor, XComposeStatus, XErrorEvent, XEvent, XKeyEvent, XSizeHints,
XStandardColormap, XVisualInfo, XrmValue, GC,
};
use super::xt::{Widget, XtAppContext};
//
// functions
//
x11_link! { Xmu, xmu, ["libXmu.so.6", "libXmu.so"], 132,
pub fn XmuAddCloseDisplayHook (_3: *mut Display, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char) -> c_int>, _1: *mut c_char) -> *mut c_char,
pub fn XmuAddInitializer (_2: Option<unsafe extern "C" fn (XtAppContext, *mut c_char)>, _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<unsafe extern "C" fn (*mut XmuDisplayQueue, *mut XmuDisplayQueueEntry) -> c_int>, _2: Option<unsafe extern "C" fn (*mut XmuDisplayQueue) -> 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<unsafe extern "C" fn (*mut Display, *mut c_char) -> 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<unsafe extern "C" fn (*mut Display, *mut c_char) -> 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;

166
vendor/x11-dl/src/xpresent.rs vendored Normal file
View File

@@ -0,0 +1,166 @@
// 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_long, c_uint, c_ulong};
use crate::sync::XSyncFence;
use crate::xfixes::XserverRegion;
use crate::xlib::{Bool, Display, Pixmap, Status, Window, XID};
use crate::xrandr::RRCrtc;
//
// functions
//
x11_link! { Xpresent, xpresent, ["libXpresent.so.1.0.0", "libXpresent.so"], 8,
pub fn XPresentQueryExtension( dpy: *mut Display, major_opcode_return: *mut c_int, event_base_return: *mut c_int, error_base_return: *mut c_int) -> Bool,
pub fn XPresentQueryVersion( dpy: *mut Display, major_version_return: *mut c_int, minor_version_return: *mut c_int ) -> Status,
pub fn XPresentVersion() -> c_int,
pub fn XPresentPixmap( dpy: *mut Display, window: Window, pixmap: Pixmap, serial: u32, valid: XserverRegion, update: XserverRegion, x_off: c_int, y_off: c_int, target_crtc: RRCrtc, wait_fence: XSyncFence, idle_fence: XSyncFence, options: u32, target_msc: u64, divisor: u64, remainder: u64, notifies: *mut XPresentNotify, nnotifies: c_int ) -> (),
pub fn XPresentNotifyMSC( dpy: *mut Display, window: Window, serial: u32, target_msc: u64, divisor: u64, remainder: u64 ) -> (),
pub fn XPresentSelectInput( dpy: *mut Display, window: Window, event_mask: c_uint ) -> XID,
pub fn XPresentFreeInput(dpy: *mut Display, window: Window, event_id: XID) -> (),
pub fn XPresentQueryCapabilities(dpy: *mut Display, target: XID) -> u32,
variadic:
globals:
}
//
// Types
//
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XPresentNotify {
pub window: Window,
pub serial: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XPresentEvent {
pub type_: c_int,
pub serial: c_ulong,
pub send_event: Bool,
pub display: *mut Display,
pub extension: c_int,
pub evtype: c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XPresentIdleNotifyEvent {
pub type_: c_int,
pub serial: c_ulong,
pub send_event: c_int,
pub display: *mut Display,
pub extension: c_int,
pub evtype: c_int,
pub eid: u32,
pub window: Window,
pub serial_number: u32,
pub pixmap: Pixmap,
pub idle_fence: XSyncFence,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XPresentCompleteNotifyEvent {
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 eid: u32,
pub window: Window,
pub serial_number: u32,
pub ust: u64,
pub msc: u64,
pub kind: u8,
pub mode: u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct XPresentConfigureNotifyEvent {
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 eid: u32,
pub window: Window,
pub x: c_int,
pub y: c_int,
pub width: c_uint,
pub height: c_uint,
pub off_x: c_int,
pub off_y: c_int,
pub pixmap_width: c_int,
pub pixmap_height: c_int,
pub pixmap_flags: c_long,
}
//
// constants
//
pub const PRESENT_NAME: &str = "Present";
pub const PRESENT_MAJOR: c_int = 1;
pub const PRESENT_MINOR: c_int = 2;
pub const PRESENT_REVISION: c_int = 0;
pub const PRESENT_VERSION: c_int = PRESENT_MAJOR * 10000 + PRESENT_MINOR * 100 + PRESENT_REVISION;
pub const PresentNumberErrors: c_int = 0;
pub const PresentNumberEvents: c_int = 0;
pub const X_PresentQueryVersion: c_int = 0;
pub const X_PresentPixmap: c_int = 1;
pub const X_PresentNotifyMSC: c_int = 2;
pub const X_PresentSelectInput: c_int = 3;
pub const X_PresentQueryCapabilities: c_int = 4;
pub const PresentNumberRequests: c_int = 5;
pub const PresentOptionNone: c_int = 0;
pub const PresentOptionAsync: c_int = 1;
pub const PresentOptionCopy: c_int = 2;
pub const PresentOptionUST: c_int = 4;
pub const PresentOptionSuboptimal: c_int = 8;
pub const PresentAllOptions: c_int = PresentOptionNone
| PresentOptionAsync
| PresentOptionCopy
| PresentOptionUST
| PresentOptionSuboptimal;
pub const PresentCapabilityNone: c_int = 0;
pub const PresentCapabilityAsync: c_int = 1;
pub const PresentCapabilityFence: c_int = 2;
pub const PresentCapabilityUST: c_int = 4;
pub const PresentAllCapabilities: c_int =
PresentCapabilityAsync | PresentCapabilityFence | PresentCapabilityUST;
pub const PresentConfigureNotify: c_int = 0;
pub const PresentCompleteNotify: c_int = 1;
pub const PresentIdleNotify: c_int = 2;
pub const PresentConfigureNotifyMask: c_int = 1;
pub const PresentCompleteNotifyMask: c_int = 2;
pub const PresentIdleNotifyMask: c_int = 4;
pub const PresentAllEvents: c_int =
PresentConfigureNotifyMask | PresentCompleteNotify | PresentIdleNotifyMask;
pub const PresentCompleteKindPixmap: c_int = 0;
pub const PresentCompleteKindNotifyMSC: c_int = 1;
pub const PresentCompleteModeCopy: c_int = 0;
pub const PresentCompleteModeFlip: c_int = 1;
pub const PresentCompleteModeSkip: c_int = 2;
pub const PresentCompleteModeSuboptimalCopy: c_int = 3;

550
vendor/x11-dl/src/xrandr.rs vendored Normal file
View File

@@ -0,0 +1,550 @@
// 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 super::xlib::{Atom, Bool, Display, Drawable, Status, Time, Window, XEvent, XID};
use super::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: &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: &str = "Backlight";
pub const RR_PROPERTY_RANDR_EDID: &str = "EDID";
pub const RR_PROPERTY_SIGNAL_FORMAT: &str = "SignalFormat";
pub const RR_PROPERTY_SIGNAL_PROPERTIES: &str = "SignalProperties";
pub const RR_PROPERTY_CONNECTOR_TYPE: &str = "ConnectorType";
pub const RR_PROPERTY_CONNECTOR_NUMBER: &str = "ConnectorNumber";
pub const RR_PROPERTY_COMPATIBILITY_LIST: &str = "CompatibilityList";
pub const RR_PROPERTY_CLONE_LIST: &str = "CloneList";
pub const RR_PROPERTY_BORDER: &str = "Border";
pub const RR_PROPERTY_BORDER_DIMENSIONS: &str = "BorderDimensions";
pub const RR_PROPERTY_GUID: &str = "GUID";
pub const RR_PROPERTY_RANDR_TILE: &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;

120
vendor/x11-dl/src/xrecord.rs vendored Normal file
View File

@@ -0,0 +1,120 @@
// 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 super::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<unsafe extern "C" fn (*mut c_char, *mut XRecordInterceptData)>, _1: *mut c_char) -> c_int,
pub fn XRecordEnableContextAsync (_4: *mut Display, _3: c_ulong, _2: Option<unsafe extern "C" fn (*mut c_char, *mut XRecordInterceptData)>, _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,
}

444
vendor/x11-dl/src/xrender.rs vendored Normal file
View File

@@ -0,0 +1,444 @@
// 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 super::xlib::{Atom, Bool, Colormap, Cursor, Display, Pixmap, Region, Visual, XRectangle, XID};
//
// 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;
pub const PictStandardARGB32: c_int = 0;
pub const PictStandardRGB24: c_int = 0;
pub const PictStandardA8: c_int = 2;
pub const PictStandardA4: c_int = 3;
pub const PictStandardA1: c_int = 4;
// 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: &str = "nearest";
pub const FilterBilinear: &str = "bilinear";
pub const FilterConvolution: &str = "convolution";
pub const FilterFast: &str = "fast";
pub const FilterGood: &str = "good";
pub const FilterBest: &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;

56
vendor/x11-dl/src/xshm.rs vendored Normal file
View File

@@ -0,0 +1,56 @@
use super::xlib::{Bool, Display, Drawable, Pixmap, Visual, XImage, GC};
use std::os::raw::{c_char, c_int, c_uint, c_ulong};
x11_link! { Xext, xext, ["libXext.so.6", "libXext.so"], 10,
pub fn XShmQueryExtension(_1: *mut Display) -> Bool,
pub fn XShmGetEventBase(_1: *mut Display) -> c_int,
pub fn XShmQueryVersion(_4: *mut Display, _3: *mut c_int, _2: *mut c_int, _1: *mut Bool) -> Bool,
pub fn XShmPixmapFormat(_1: *mut Display) -> c_int,
pub fn XShmAttach(_2: *mut Display, _1: *mut XShmSegmentInfo) -> Bool,
pub fn XShmDetach(_2: *mut Display, _1: *mut XShmSegmentInfo) -> Bool,
pub fn XShmPutImage(_11: *mut Display, _10: Drawable, _9: GC, _8: *mut XImage, _7: c_int, _6: c_int, _5: c_int, _4: c_int, _3: c_uint, _2: c_uint, _1: Bool) -> Bool,
pub fn XShmGetImage(_6: *mut Display, _5: Drawable, _4: *mut XImage, _3: c_int, _2: c_int, _1: c_uint) -> Bool,
pub fn XShmCreateImage(_8: *mut Display, _7: *mut Visual, _6: c_uint, _5: c_int, _4: *mut c_char, _3: *mut XShmSegmentInfo, _2: c_uint, _1: c_uint) -> *mut XImage,
pub fn XShmCreatePixmap(_7: *mut Display, _6: Drawable, _5: *mut c_char, _4: *mut XShmSegmentInfo, _3: c_uint, _2: c_uint, _1: c_uint) -> Pixmap,
variadic:
globals:
}
pub type ShmSeg = c_ulong;
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C)]
pub struct XShmCompletionEvent {
/// of event
pub _type: c_int,
/// # of last request processed by server
pub serial: c_uint,
/// true if this came from a SendEvent request
pub send_event: Bool,
/// Display the event was read from
pub diplay: *mut Display,
/// drawable of request
pub drawable: *mut Drawable,
/// ShmReqCode
pub major_code: c_int,
/// X_ShmPutImage
pub minor_code: c_int,
/// the ShmSeg used in the request
pub shmseg: ShmSeg,
/// the offset into ShmSeg used in the request
pub offset: c_ulong,
}
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C)]
pub struct XShmSegmentInfo {
/// resource id
pub shmseg: ShmSeg,
/// kernel id
pub shmid: c_int,
/// address in client
pub shmaddr: *mut c_char,
/// how the server should attach it
pub readOnly: Bool,
}

91
vendor/x11-dl/src/xss.rs vendored Normal file
View File

@@ -0,0 +1,91 @@
// x11-rs: Rust bindings for X11 libraries
// The X11 libraries are available under the MIT license.
// These bindings are public domain.
use super::xlib::{
Atom, Bool, Display, Drawable, Status, Time, Visual, Window, XEvent, XSetWindowAttributes, XID,
};
use std::os::raw::{c_int, c_uint, c_ulong};
//
// 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: &str = "MIT-SCREEN-SAVER";
pub const ScreenSaverPropertyName: &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;

386
vendor/x11-dl/src/xt.rs vendored Normal file
View File

@@ -0,0 +1,386 @@
// 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 super::xlib::{
Display, Region, Screen, Visual, XEvent, XGCValues, XSelectionRequestEvent,
XSetWindowAttributes, XrmOptionDescList, XrmValue, _XrmHashBucketRec, GC,
};
//
// 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<unsafe extern "C" fn (Widget, *mut c_void, *mut c_void)>, _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<unsafe extern "C" fn (*mut XrmValue, *mut c_uint, *mut XrmValue, *mut XrmValue)>, _2: XtConvertArgList, _1: c_uint) -> (),
pub fn XtAddEventHandler (_5: Widget, _4: c_ulong, _3: c_char, _2: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _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<unsafe extern "C" fn (*mut c_void, *mut c_int, *mut c_ulong)>, _1: *mut c_void) -> c_ulong,
pub fn XtAddRawEventHandler (_5: Widget, _4: c_ulong, _3: c_char, _2: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _1: *mut c_void) -> (),
pub fn XtAddSignal (_2: Option<unsafe extern "C" fn (*mut c_void, *mut c_ulong)>, _1: *mut c_void) -> c_ulong,
pub fn XtAddTimeOut (_3: c_ulong, _2: Option<unsafe extern "C" fn (*mut c_void, *mut c_ulong)>, _1: *mut c_void) -> c_ulong,
pub fn XtAddWorkProc (_2: Option<unsafe extern "C" fn (*mut c_void) -> 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<unsafe extern "C" fn (Widget, *mut c_void, *mut c_char, *mut XEvent, *mut *mut c_char, *mut c_uint)>, _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<unsafe extern "C" fn (*mut c_void)>, _1: *mut c_void) -> c_ulong,
pub fn XtAppAddConverter (_6: XtAppContext, _5: *const c_char, _4: *const c_char, _3: Option<unsafe extern "C" fn (*mut XrmValue, *mut c_uint, *mut XrmValue, *mut XrmValue)>, _2: XtConvertArgList, _1: c_uint) -> (),
pub fn XtAppAddInput (_5: XtAppContext, _4: c_int, _3: *mut c_void, _2: Option<unsafe extern "C" fn (*mut c_void, *mut c_int, *mut c_ulong)>, _1: *mut c_void) -> c_ulong,
pub fn XtAppAddSignal (_3: XtAppContext, _2: Option<unsafe extern "C" fn (*mut c_void, *mut c_ulong)>, _1: *mut c_void) -> c_ulong,
pub fn XtAppAddTimeOut (_4: XtAppContext, _3: c_ulong, _2: Option<unsafe extern "C" fn (*mut c_void, *mut c_ulong)>, _1: *mut c_void) -> c_ulong,
pub fn XtAppAddWorkProc (_3: XtAppContext, _2: Option<unsafe extern "C" fn (*mut c_void) -> 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<unsafe extern "C" fn (*mut c_char)>) -> Option<unsafe extern "C" fn (*mut c_char)>,
pub fn XtAppSetErrorMsgHandler (_2: XtAppContext, _1: Option<unsafe extern "C" fn (*mut c_char, *mut c_char, *mut c_char, *mut c_char, *mut *mut c_char, *mut c_uint)>) -> Option<unsafe extern "C" fn (*mut c_char, *mut c_char, *mut c_char, *mut c_char, *mut *mut c_char, *mut c_uint)>,
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<unsafe extern "C" fn (*mut Display, *mut XrmValue, *mut c_uint, *mut XrmValue, *mut XrmValue, *mut *mut c_void) -> c_char>, _4: XtConvertArgList, _3: c_uint, _2: c_int, _1: Option<unsafe extern "C" fn (XtAppContext, *mut XrmValue, *mut c_void, *mut XrmValue, *mut c_uint)>) -> (),
pub fn XtAppSetWarningHandler (_2: XtAppContext, _1: Option<unsafe extern "C" fn (*mut c_char)>) -> Option<unsafe extern "C" fn (*mut c_char)>,
pub fn XtAppSetWarningMsgHandler (_2: XtAppContext, _1: Option<unsafe extern "C" fn (*mut c_char, *mut c_char, *mut c_char, *mut c_char, *mut *mut c_char, *mut c_uint)>) -> Option<unsafe extern "C" fn (*mut c_char, *mut c_char, *mut c_char, *mut c_char, *mut *mut c_char, *mut c_uint)>,
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<unsafe extern "C" fn (*mut Display, *mut XrmValue, *mut c_uint, *mut XrmValue, *mut XrmValue, *mut *mut c_void) -> 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<unsafe extern "C" fn (Widget, *mut Widget, *mut c_uint, *mut Widget, *mut c_uint, *mut c_void)>, _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<unsafe extern "C" fn (*mut XrmValue, *mut c_uint, *mut XrmValue, *mut XrmValue)>, _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<unsafe extern "C" fn (*mut c_char) -> 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<unsafe extern "C" fn (Widget, *mut c_void, *mut c_ulong, *mut c_ulong, *mut c_void, *mut c_ulong, *mut c_int)>, _2: *mut c_void, _1: c_ulong) -> (),
pub fn XtGetSelectionValueIncremental (_6: Widget, _5: c_ulong, _4: c_ulong, _3: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut c_ulong, *mut c_ulong, *mut c_void, *mut c_ulong, *mut c_int)>, _2: *mut c_void, _1: c_ulong) -> (),
pub fn XtGetSelectionValues (_7: Widget, _6: c_ulong, _5: *mut c_ulong, _4: c_int, _3: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut c_ulong, *mut c_ulong, *mut c_void, *mut c_ulong, *mut c_int)>, _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<unsafe extern "C" fn (Widget, *mut c_void, *mut c_ulong, *mut c_ulong, *mut c_void, *mut c_ulong, *mut c_int)>, _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<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _2: *mut c_void, _1: XtListPosition) -> (),
pub fn XtInsertEventTypeHandler (_6: Widget, _5: c_int, _4: *mut c_void, _3: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _2: *mut c_void, _1: XtListPosition) -> (),
pub fn XtInsertRawEventHandler (_6: Widget, _5: c_ulong, _4: c_char, _3: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _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<unsafe extern "C" fn (Widget, *mut c_ulong, *mut c_ulong, *mut c_ulong, *mut *mut c_void, *mut c_ulong, *mut c_int) -> c_char>, _2: Option<unsafe extern "C" fn (Widget, *mut c_ulong)>, _1: Option<unsafe extern "C" fn (Widget, *mut c_ulong, *mut c_ulong)>) -> c_char,
pub fn XtOwnSelectionIncremental (_8: Widget, _7: c_ulong, _6: c_ulong, _5: Option<unsafe extern "C" fn (Widget, *mut c_ulong, *mut c_ulong, *mut c_ulong, *mut *mut c_void, *mut c_ulong, *mut c_int, *mut c_ulong, *mut c_void, *mut *mut c_void) -> c_char>, _4: Option<unsafe extern "C" fn (Widget, *mut c_ulong, *mut c_void)>, _3: Option<unsafe extern "C" fn (Widget, *mut c_ulong, *mut c_ulong, *mut *mut c_void, *mut c_void)>, _2: Option<unsafe extern "C" fn (Widget, *mut c_ulong, *mut c_ulong, *mut *mut c_void, *mut c_void)>, _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<unsafe extern "C" fn (*mut Display, c_ulong, *mut c_ulong, *mut c_ulong)>, _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<unsafe extern "C" fn (Widget, *mut c_int, *mut *mut c_void, c_int, *mut c_void)>, _1: *mut c_void) -> (),
pub fn XtRegisterGrabAction (_5: Option<unsafe extern "C" fn (Widget, *mut XEvent, *mut *mut c_char, *mut c_uint)>, _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<unsafe extern "C" fn (Widget, *mut c_void, *mut c_void)>, _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<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _1: *mut c_void) -> (),
pub fn XtRemoveEventTypeHandler (_5: Widget, _4: c_int, _3: *mut c_void, _2: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _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<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _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<unsafe extern "C" fn (*mut c_char) -> 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<unsafe extern "C" fn (*mut c_char)>) -> (),
pub fn XtSetErrorMsgHandler (_1: Option<unsafe extern "C" fn (*mut c_char, *mut c_char, *mut c_char, *mut c_char, *mut *mut c_char, *mut c_uint)>) -> (),
pub fn XtSetEventDispatcher (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut XEvent) -> c_char>) -> Option<unsafe extern "C" fn (*mut XEvent) -> c_char>,
pub fn XtSetKeyboardFocus (_2: Widget, _1: Widget) -> (),
pub fn XtSetKeyTranslator (_2: *mut Display, _1: Option<unsafe extern "C" fn (*mut Display, c_uchar, c_uint, *mut c_uint, *mut c_ulong)>) -> (),
pub fn XtSetLanguageProc (_3: XtAppContext, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char, *mut c_void) -> *mut c_char>, _1: *mut c_void) -> Option<unsafe extern "C" fn (*mut Display, *mut c_char, *mut c_void) -> *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<unsafe extern "C" fn (*mut Display, *mut XrmValue, *mut c_uint, *mut XrmValue, *mut XrmValue, *mut *mut c_void) -> c_char>, _4: XtConvertArgList, _3: c_uint, _2: c_int, _1: Option<unsafe extern "C" fn (XtAppContext, *mut XrmValue, *mut c_void, *mut XrmValue, *mut c_uint)>) -> (),
pub fn XtSetValues (_3: Widget, _2: *mut Arg, _1: c_uint) -> (),
pub fn XtSetWarningHandler (_1: Option<unsafe extern "C" fn (*mut c_char)>) -> (),
pub fn XtSetWarningMsgHandler (_1: Option<unsafe extern "C" fn (*mut c_char, *mut c_char, *mut c_char, *mut c_char, *mut *mut c_char, *mut c_uint)>) -> (),
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::<TestEnum>() == ::std::mem::size_of::<c_int>());
}
// 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;

32
vendor/x11-dl/src/xtest.rs vendored Normal file
View File

@@ -0,0 +1,32 @@
// 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 super::xinput::XDevice;
use super::xlib::{Display, Visual, GC};
//
// 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 (_5: *mut Display, _4: c_int, _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:
}