|
| 1 | +extern crate libc; |
| 2 | + |
| 3 | +use defines::AfError; |
| 4 | +use defines::Aftype; |
| 5 | +use self::libc::{uint8_t, c_int, c_uint, c_double}; |
| 6 | + |
| 7 | +type MutWindow = *mut self::libc::c_ulonglong; |
| 8 | +type Window = self::libc::c_ulonglong; |
| 9 | +type AfArray = self::libc::c_longlong; |
| 10 | +type Cell = *const self::libc::c_void; |
| 11 | + |
| 12 | +#[allow(dead_code)] |
| 13 | +extern { |
| 14 | + fn af_create_window(out: MutWindow, w: c_int, h: c_int, title: *const u8) -> c_int; |
| 15 | + fn af_set_position(wnd: Window, x: c_uint, y: c_uint) -> c_int; |
| 16 | + fn af_set_title(wnd: Window, title: *const u8) -> c_int; |
| 17 | + fn af_draw_image(wnd: Window, arr: AfArray, props: Cell) -> c_int; |
| 18 | + fn af_draw_plot(wnd: Window, x: AfArray, y: AfArray, props: Cell) -> c_int; |
| 19 | + fn af_grid(wnd: Window, rows: c_int, cols: c_int) -> c_int; |
| 20 | + fn af_show(wnd: Window) -> c_int; |
| 21 | + fn af_is_window_closed(out: *mut c_int, wnd: Window) -> c_int; |
| 22 | + fn af_destroy_window(wnd: Window) -> c_int; |
| 23 | + |
| 24 | + fn af_draw_hist(wnd: Window, x: AfArray, |
| 25 | + minval: c_double, maxval: c_double, props: Cell) -> c_int; |
| 26 | +} |
0 commit comments