aboutsummaryrefslogtreecommitdiffstats
path: root/src/ffi.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ffi.rs')
-rw-r--r--src/ffi.rs90
1 files changed, 67 insertions, 23 deletions
diff --git a/src/ffi.rs b/src/ffi.rs
index ab9abc8..f86eb12 100644
--- a/src/ffi.rs
+++ b/src/ffi.rs
@@ -5,7 +5,7 @@ use types;
extern "C" {
pub fn vt100_screen_new(
rows: libc::c_int,
- cols: libc::c_int
+ cols: libc::c_int,
) -> *mut types::ScreenImpl;
pub fn vt100_screen_delete(screen: *mut types::ScreenImpl);
@@ -47,29 +47,73 @@ extern "C" {
// XXX: these wrappers (and all of ffi.c) only exist because rust can't
// handle bitfields yet - once it can, these should be removed
- pub fn vt100_wrapper_screen_hide_cursor(screen: *mut types::ScreenImpl) -> libc::c_int;
- pub fn vt100_wrapper_screen_application_keypad(screen: *mut types::ScreenImpl) -> libc::c_int;
- pub fn vt100_wrapper_screen_application_cursor(screen: *mut types::ScreenImpl) -> libc::c_int;
- pub fn vt100_wrapper_screen_mouse_reporting_press(screen: *mut types::ScreenImpl) -> libc::c_int;
- pub fn vt100_wrapper_screen_mouse_reporting_press_release(screen: *mut types::ScreenImpl) -> libc::c_int;
- pub fn vt100_wrapper_screen_mouse_reporting_button_motion(screen: *mut types::ScreenImpl) -> libc::c_int;
- pub fn vt100_wrapper_screen_mouse_reporting_mode(screen: *mut types::ScreenImpl) -> libc::c_uchar;
- pub fn vt100_wrapper_screen_bracketed_paste(screen: *mut types::ScreenImpl) -> libc::c_int;
- pub fn vt100_wrapper_screen_visual_bell(screen: *mut types::ScreenImpl) -> libc::c_int;
- pub fn vt100_wrapper_screen_audible_bell(screen: *mut types::ScreenImpl) -> libc::c_int;
- pub fn vt100_wrapper_screen_update_title(screen: *mut types::ScreenImpl) -> libc::c_int;
- pub fn vt100_wrapper_screen_update_icon_name(screen: *mut types::ScreenImpl) -> libc::c_int;
- pub fn vt100_wrapper_screen_dirty(screen: *mut types::ScreenImpl) -> libc::c_int;
- pub fn vt100_wrapper_screen_clear_visual_bell(screen: *mut types::ScreenImpl);
- pub fn vt100_wrapper_screen_clear_audible_bell(screen: *mut types::ScreenImpl);
- pub fn vt100_wrapper_screen_clear_update_title(screen: *mut types::ScreenImpl);
- pub fn vt100_wrapper_screen_clear_update_icon_name(screen: *mut types::ScreenImpl);
+ pub fn vt100_wrapper_screen_hide_cursor(
+ screen: *mut types::ScreenImpl,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_screen_application_keypad(
+ screen: *mut types::ScreenImpl,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_screen_application_cursor(
+ screen: *mut types::ScreenImpl,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_screen_mouse_reporting_press(
+ screen: *mut types::ScreenImpl,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_screen_mouse_reporting_press_release(
+ screen: *mut types::ScreenImpl,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_screen_mouse_reporting_button_motion(
+ screen: *mut types::ScreenImpl,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_screen_mouse_reporting_mode(
+ screen: *mut types::ScreenImpl,
+ ) -> libc::c_uchar;
+ pub fn vt100_wrapper_screen_bracketed_paste(
+ screen: *mut types::ScreenImpl,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_screen_visual_bell(
+ screen: *mut types::ScreenImpl,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_screen_audible_bell(
+ screen: *mut types::ScreenImpl,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_screen_update_title(
+ screen: *mut types::ScreenImpl,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_screen_update_icon_name(
+ screen: *mut types::ScreenImpl,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_screen_dirty(
+ screen: *mut types::ScreenImpl,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_screen_clear_visual_bell(
+ screen: *mut types::ScreenImpl,
+ );
+ pub fn vt100_wrapper_screen_clear_audible_bell(
+ screen: *mut types::ScreenImpl,
+ );
+ pub fn vt100_wrapper_screen_clear_update_title(
+ screen: *mut types::ScreenImpl,
+ );
+ pub fn vt100_wrapper_screen_clear_update_icon_name(
+ screen: *mut types::ScreenImpl,
+ );
pub fn vt100_wrapper_screen_clear_dirty(screen: *mut types::ScreenImpl);
- pub fn vt100_wrapper_cell_is_wide(cell: *mut types::CellImpl) -> libc::c_int;
- pub fn vt100_wrapper_cell_attrs_bold(cell: *mut types::CellAttrs) -> libc::c_int;
- pub fn vt100_wrapper_cell_attrs_italic(cell: *mut types::CellAttrs) -> libc::c_int;
- pub fn vt100_wrapper_cell_attrs_underline(cell: *mut types::CellAttrs) -> libc::c_int;
- pub fn vt100_wrapper_cell_attrs_inverse(cell: *mut types::CellAttrs) -> libc::c_int;
+ pub fn vt100_wrapper_cell_is_wide(
+ cell: *mut types::CellImpl,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_cell_attrs_bold(
+ cell: *mut types::CellAttrs,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_cell_attrs_italic(
+ cell: *mut types::CellAttrs,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_cell_attrs_underline(
+ cell: *mut types::CellAttrs,
+ ) -> libc::c_int;
+ pub fn vt100_wrapper_cell_attrs_inverse(
+ cell: *mut types::CellAttrs,
+ ) -> libc::c_int;
}
#[cfg(test)]