fltk-sys

Raw bindings for FLTK. These are generated using bindgen on the cfltk headers.

Usage

toml [dependencies] fltk-sys = "1.4"

Example code: ```rust,norun use fltksys::; use std::os::raw::;

unsafe extern "C" fn cb(wid: *mut button::FlWidget, data: *mut cvoid) { let frame = data as *mut frame::FlBox; frame::FlBoxsetlabel(frame, "Hello World\0".asptr() as *const _); }

fn main() { unsafe { fl::Flinitall(); image::Flregisterimages(); fl::Fllock(); let win = window::FlWindownew(100, 100, 400, 300, "Window\0".asptr() as *const ); let frame = frame::FlBoxnew(0, 0, 400, 200, std::ptr::null()); let but = button::FlButtonnew(160, 220, 80, 40, "Click\0".asptr() as *const ); window::FlWindowend(win); window::FlWindow_show(win);

    button::Fl_Button_set_callback(but, Some(cb), frame as *mut _);

    fl::Fl_run();
}

} ```

Dependencies

CMake > 3.14, git and a C++11 compiler. The dev dependencies are basically the same as for fltk-rs.

Why you might want to use fltk-sys directly