drm 0.6.1

Safe, low-level bindings to the Direct Rendering Manager API
Documentation
extern crate drm;
extern crate image;

/// Check the `util` module to see how the `Card` structure is implemented.
pub mod utils;
use utils::*;

pub fn main() {
    let card = Card::open_global();

    let resources = card.resource_handles().unwrap();
    for connector in resources.connectors().iter() {
        let info = card.get_connector(*connector).unwrap();
        println!("Connector {:?}: {:?}", info.interface(), info.state());
        if info.state() == drm::control::connector::State::Connected {
            println!("\t Modes:\n{:#?}", info.modes());
        }
    }
}