Skip to content

Add Xcomposite bindings #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions src/xcomposite.rs
Original file line number Diff line number Diff line change
@@ -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,
};

use ::xlib::{
Bool,
XID,
Status,
Window,
Display,
Pixmap
};


//
// functions
//

x11_link! { Xcomposite, xcomposite, ["libXcomposite.so.1", "libXcomposite.so"], 11,
pub fn XCompositeQueryExtension(_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> Bool,
pub fn XCompositeQueryVersion(_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> Status,
pub fn XCompositeVersion() -> c_int,
pub fn XCompositeRedirectWindow(_3: *mut Display, _2: Window, _1: c_int) -> (),
pub fn XCompositeRedirectSubwindows(_3: *mut Display, _2: Window, _1: c_int) -> (),
pub fn XCompositeUnredirectWindow(_3: *mut Display, _2: Window, _1: c_int) -> (),
pub fn XCompositeUnredirectSubwindows(_3: *mut Display, _2: Window, _1: c_int) -> (),
pub fn XCompositeCreateRegionFromBorderClip(_2: *mut Display, _1: Window) -> XserverRegion,
pub fn XCompositeNameWindowPixmap(_2: *mut Display, _1: Window) -> Pixmap,
pub fn XCompositeGetOverlayWindow(_2: *mut Display, _1: Window) -> Window,
pub fn XCompositeReleaseOverlayWindow(_2: *mut Display, _1: Window) -> (),
variadic:
globals:
}


//
// types
//

pub type XserverRegion = XID;


//
// constants
//

pub const CompositeRedirectAutomatic: c_int = 0;
pub const CompositeRedirectManual: c_int = 1;
1 change: 1 addition & 0 deletions x11-dl/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ fn main() {
// lib pkgconfig name
("xext", "xext"),
("gl", "gl"),
("xcomposite", "xcomposite"),
("xcursor", "xcursor"),
("xxf86vm", "xxf86vm"),
("xft", "xft"),
Expand Down
1 change: 1 addition & 0 deletions x11-dl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub mod xlib;
pub mod dpms;
pub mod glx;
pub mod keysym;
pub mod xcomposite;
pub mod xcursor;
pub mod xf86vmode;
pub mod xfixes;
Expand Down
1 change: 1 addition & 0 deletions x11-dl/src/xcomposite.rs
1 change: 1 addition & 0 deletions x11/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ all = ["dpms",
"dox"]
dpms = []
glx = []
xcomposite = []
xcursor = []
xf86vmode = []
xft = []
Expand Down
1 change: 1 addition & 0 deletions x11/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ fn main() {
("gl", "1", "glx"),
("x11", "1.4.99.1", "xlib"),
("x11-xcb", "1.6", "xlib_xcb"),
("xcomposite", "0.4.5", "xcomposite"),
("xcursor", "1.1", "xcursor"),
("xext", "1.3", "dpms"),
("xft", "2.1", "xft"),
Expand Down
1 change: 1 addition & 0 deletions x11/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub mod xlib;
pub mod dpms;
pub mod glx;
pub mod keysym;
pub mod xcomposite;
pub mod xcursor;
pub mod xf86vmode;
pub mod xfixes;
Expand Down
1 change: 1 addition & 0 deletions x11/src/xcomposite.rs