rust: generate direct mode bindings

When we split direct.h out from notcurses.h, I forgot to add
the new header file to the bindgen-rs includes. I've added
it, and also added a simple directmode unit test.

Closes #853. Thanks @joseluis for reporting this issue!
This commit is contained in:
nick black 2020-08-06 08:14:29 -04:00 committed by Nick Black
parent 59fe0cb829
commit df25fc99b9
2 changed files with 12 additions and 1 deletions

View File

@ -95,11 +95,21 @@ mod tests {
margin_r: 0,
margin_b: 0,
margin_l: 0,
flags: NCOPTION_NO_ALTERNATE_SCREEN as u64,
flags: (NCOPTION_NO_ALTERNATE_SCREEN | NCOPTION_INHIBIT_SETLOCALE) as u64,
};
let nc = notcurses_init(&opts, std::ptr::null_mut());
notcurses_stop(nc);
}
}
#[test]
#[serial]
fn create_direct_context() {
unsafe {
let _ = libc::setlocale(libc::LC_ALL, std::ffi::CString::new("").unwrap().as_ptr());
let nc = ncdirect_init(std::ptr::null_mut(), std::ptr::null_mut());
ncdirect_stop(nc);
}
}
}

View File

@ -1 +1,2 @@
#include <notcurses/notcurses.h>
#include <notcurses/direct.h>