fz_document_open_fn

Type Alias fz_document_open_fn 

Source
pub type fz_document_open_fn = Option<unsafe extern "C" fn(ctx: *mut fz_context, handler: *const fz_document_handler, stream: *mut fz_stream, accel: *mut fz_stream, dir: *mut fz_archive, recognize_state: *mut c_void) -> *mut fz_document>;
Expand description

Function type to open a
document from a file.

handler: the document handler in use.

stream: fz_stream to read document data from. Must be
seekable for formats that require it.

accel: fz_stream to read accelerator data from. May be
NULL. May be ignored.

dir: ‘Directory context’ in which the document is loaded;
associated content from (like images for an html stream
will be loaded from this). Maybe NULL. May be ignored.

recognize_state: NULL, or a state pointer passed back from the call
to recognise_content_fn. Ownership does not pass in. The
caller remains responsible for freeing state.

Pointer to opened document. Throws exception in case of error.

Aliased Type§

pub enum fz_document_open_fn {
    None,
    Some(unsafe extern "C" fn(*mut fz_context, *const fz_document_handler, *mut fz_stream, *mut fz_stream, *mut fz_archive, *mut c_void) -> *mut fz_document),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut fz_context, *const fz_document_handler, *mut fz_stream, *mut fz_stream, *mut fz_archive, *mut c_void) -> *mut fz_document)

Some value of type T.