Skip to content
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

Add Xcomposite bindings #121

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Add Xcomposite bindings #121

wants to merge 5 commits into from

Conversation

malwrar
Copy link

@malwrar malwrar commented Oct 26, 2020

Didn't test this too much, but it looks like the x11 crate bindings work on my end. Some test code:

use std::ptr::{null};
use std::os::raw::c_int;
use x11::xlib::*;
use x11::xcomposite::*;

fn main() {
    unsafe {
        let mut event_base_return: c_int = 0;
        let mut error_base_return: c_int = 0;

        let display = XOpenDisplay(null());
        if display.is_null() {
            panic!("Failed to open default X display.");
        }

        XCompositeQueryExtension(display, &mut event_base_return, &mut error_base_return);
        let xcomposite_version = XCompositeVersion();

        println!("{} {}", event_base_return, error_base_return);
        println!("{}", xcomposite_version);
    }
}

@LoganDark

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants