[][src]Function gifski::c_api::gifski_set_progress_callback

#[no_mangle]
pub extern "C" fn gifski_set_progress_callback(
    handle: *const GifskiHandle,
    cb: unsafe fn(_: *mut c_void) -> c_int,
    user_data: *mut c_void
)

Get a callback for frame processed, and abort processing if desired.

The callback is called once per frame. It gets arbitrary pointer (user_data) as an argument. user_data can be NULL. The callback must be thread-safe (it will be called from another thread).

The callback must return 1 to continue processing, or 0 to abort.

Must be called before gifski_write() to take effect.