1// x11-rs: Rust bindings for X11 libraries
2// The X11 libraries are available under the MIT license.
3// These bindings are public domain.
4
5use std::os::raw::{c_int, c_short};
6
7use super::xlib::{Bool, Display, Drawable, Status, Window, XID};
8
9//
10// functions
11//
12
13x11_link! { Xlib, xinerama, ["libXinerama.so.1", "libXinerama.so"], 10,
14 pub fn XineramaIsActive (dpy: *mut Display) -> Bool,
15 pub fn XineramaQueryExtension (dpy: *mut Display, event_base: *mut c_int, error_base: *mut c_int) -> Bool,
16 pub fn XineramaQueryScreens (dpy: *mut Display, number: *mut c_int) -> *mut XineramaScreenInfo,
17 pub fn XineramaQueryVersion (dpy: *mut Display, major_versionp: *mut c_int, minor_versionp: *mut c_int) -> Status,
18 pub fn XPanoramiXAllocInfo () -> *mut XPanoramiXInfo,
19 pub fn XPanoramiXGetScreenCount (dpy: *mut Display, drawable: Drawable, panoramiX_info: *mut XPanoramiXInfo) -> Status,
20 pub fn XPanoramiXGetScreenSize (dpy: *mut Display, drawable: Drawable, screen_num: c_int, panoramiX_info: *mut XPanoramiXInfo) -> Status,
21 pub fn XPanoramiXGetState (dpy: *mut Display, drawable: Drawable, panoramiX_info: *mut XPanoramiXInfo) -> Status,
22 pub fn XPanoramiXQueryExtension (dpy: *mut Display, event_base_return: *mut c_int, error_base_return: *mut c_int) -> Bool,
23 pub fn XPanoramiXQueryVersion (dpy: *mut Display, major_version_return: *mut c_int, minor_version_return: *mut c_int) -> Status,
24variadic:
25globals:
26}
27
28//
29// types
30//
31
32#[derive(Debug, Clone, Copy, PartialEq)]
33#[repr(C)]
34pub struct XineramaScreenInfo {
35 pub screen_number: c_int,
36 pub x_org: c_short,
37 pub y_org: c_short,
38 pub width: c_short,
39 pub height: c_short,
40}
41
42#[derive(Debug, Clone, Copy, PartialEq)]
43#[repr(C)]
44pub struct XPanoramiXInfo {
45 pub window: Window,
46 pub screen: c_int,
47 pub State: c_int,
48 pub width: c_int,
49 pub height: c_int,
50 pub ScreenCount: c_int,
51 pub eventMask: XID,
52}
53