libseat-sys-0.1.9/.cargo_vcs_info.json0000644000000001510000000000100132770ustar { "git": { "sha1": "2d46bdabc41bbcf7b67032693d37241736e69d04" }, "path_in_vcs": "libseat-sys" }libseat-sys-0.1.9/Cargo.toml0000644000000022330000000000100113000ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "libseat-sys" version = "0.1.9" authors = ["Poly "] build = "build.rs" autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "libseat bindings" documentation = "https://docs.rs/libseat-sys" readme = false keywords = ["libseat"] license = "MIT" repository = "https://github.com/PolyMeilex/libseat-rs" [package.metadata.docs.rs] features = ["docs_rs"] no-default-features = true [lib] name = "libseat_sys" path = "src/lib.rs" [build-dependencies.bindgen] version = "0.58.1" optional = true [build-dependencies.pkg-config] version = "0.3.19" [features] docs_rs = [] use_bindgen = ["bindgen"] libseat-sys-0.1.9/Cargo.toml.orig000064400000000000000000000011021046102023000147530ustar 00000000000000[package] name = "libseat-sys" description = "libseat bindings" version = "0.1.9" authors = ["Poly "] edition = "2018" keywords = ["libseat"] license = "MIT" repository = "https://github.com/PolyMeilex/libseat-rs" documentation = "https://docs.rs/libseat-sys" [features] use_bindgen = ["bindgen"] # Used to disable linking in docs.rs enviroment docs_rs = [] [build-dependencies] bindgen = { version = "0.58.1", optional = true } pkg-config = { version = "0.3.19" } [package.metadata.docs.rs] no-default-features = true features = ["docs_rs"] libseat-sys-0.1.9/build.rs000064400000000000000000000020721046102023000135400ustar 00000000000000#[cfg(all(feature = "use_bindgen", not(any(docsrs, feature = "docs_rs"))))] fn main() { use bindgen::Builder; let library = pkg_config::probe_library("libseat").unwrap(); println!("cargo:rerun-if-changed=src/wrapper.h"); let mut builder = Builder::default() .header("src/wrapper.h") .layout_tests(false) .allowlist_recursively(false) .allowlist_type("libseat.*") .allowlist_function("libseat.*") .allowlist_var("libseat.*") .blocklist_item("libseat_set_log_handler") .blocklist_item("libseat_log_func"); for i in &library.include_paths { builder = builder.clang_arg(format!("-I{}", i.display())); } let bindings = builder.generate().expect("Unable to generate bindings"); bindings .write_to_file("./src/bindings.rs") .expect("Couldn't write bindings!"); } #[cfg(all(not(feature = "use_bindgen"), not(any(docsrs, feature = "docs_rs"))))] fn main() { pkg_config::probe_library("libseat").unwrap(); } #[cfg(any(docsrs, feature = "docs_rs"))] fn main() {} libseat-sys-0.1.9/src/bindings.rs000064400000000000000000000041741046102023000150320ustar 00000000000000/* automatically generated by rust-bindgen 0.58.1 */ #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libseat { _unused: [u8; 0], } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libseat_seat_listener { pub enable_seat: ::std::option::Option< unsafe extern "C" fn(seat: *mut libseat, userdata: *mut ::std::os::raw::c_void), >, pub disable_seat: ::std::option::Option< unsafe extern "C" fn(seat: *mut libseat, userdata: *mut ::std::os::raw::c_void), >, } extern "C" { pub fn libseat_open_seat( listener: *mut libseat_seat_listener, userdata: *mut ::std::os::raw::c_void, ) -> *mut libseat; } extern "C" { pub fn libseat_disable_seat(seat: *mut libseat) -> ::std::os::raw::c_int; } extern "C" { pub fn libseat_close_seat(seat: *mut libseat) -> ::std::os::raw::c_int; } extern "C" { pub fn libseat_open_device( seat: *mut libseat, path: *const ::std::os::raw::c_char, fd: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn libseat_close_device( seat: *mut libseat, device_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn libseat_seat_name(seat: *mut libseat) -> *const ::std::os::raw::c_char; } extern "C" { pub fn libseat_switch_session( seat: *mut libseat, session: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn libseat_get_fd(seat: *mut libseat) -> ::std::os::raw::c_int; } extern "C" { pub fn libseat_dispatch( seat: *mut libseat, timeout: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } pub const libseat_log_level_LIBSEAT_LOG_LEVEL_SILENT: libseat_log_level = 0; pub const libseat_log_level_LIBSEAT_LOG_LEVEL_ERROR: libseat_log_level = 1; pub const libseat_log_level_LIBSEAT_LOG_LEVEL_INFO: libseat_log_level = 2; pub const libseat_log_level_LIBSEAT_LOG_LEVEL_DEBUG: libseat_log_level = 3; pub const libseat_log_level_LIBSEAT_LOG_LEVEL_LAST: libseat_log_level = 4; pub type libseat_log_level = ::std::os::raw::c_uint; extern "C" { pub fn libseat_set_log_level(level: libseat_log_level); } libseat-sys-0.1.9/src/lib.rs000064400000000000000000000001701046102023000137730ustar 00000000000000#![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] include!("./bindings.rs"); libseat-sys-0.1.9/src/wrapper.h000064400000000000000000000000511046102023000145060ustar 00000000000000#include #include