msgbox 0.1.0

Simple, cross-platform message box GUI library. All it does is to show a message box modal with a OK button, which runs synchronously. All the other jobs stop until the user responds. It runs fine with OpenGL windows already open. It supports multi-platform, and maintains separate dependencies per platform, thus light-weight. - Synchronous Message Modal - Multi-platform (Linux GTK3+ and Windows yet) - Light-weight
Documentation
extern crate user32;
extern crate winapi;

use icon::IconType;

pub fn create(title:&str, content:&str, icon_type:IconType) {
    use std::ffi::CString;
    use std::ptr::null_mut;
    use self::user32::MessageBoxA;
    use self::winapi::winuser::{MB_OK, MB_ICONINFORMATION, MB_ICONERROR, MB_SYSTEMMODAL};

    let lp_text = CString::new(content).unwrap();
    let lp_caption = CString::new(title).unwrap();

    let window_type = match icon_type {
        IconType::ERROR => MB_OK | MB_ICONERROR | MB_SYSTEMMODAL,
        IconType::INFO => MB_OK | MB_ICONINFORMATION | MB_SYSTEMMODAL,
        IconType::NONE => MB_OK | MB_SYSTEMMODAL,
    };

    unsafe {
        MessageBoxA(
            null_mut(),
            lp_text.as_ptr(),
            lp_caption.as_ptr(),
            window_type
        );
    }
}