package xcursor

  1. Overview
  2. Docs

Module Xcursor.CursorSource

Cursor file modules.

Contains functions used for cursor files which contain the images and metadata for cursors.

Sourcemodule Card32 : sig ... end
Sourcemodule Header : sig ... end
Sourcemodule Image : sig ... end
Sourcetype t = {
  1. header : Header.t;
  2. data : Bigstringaf.t;
}

Cursor file with parsed header.

Sourceval of_bigstring : Bigstringaf.t -> (t, string) result

Get a cursor from parsing a bigstring.

Sourceval of_descr : ?pos:int -> ?size:int -> Unix.file_descr -> (t, string) result

Get a cursor from parsing a memory-mapped a Unix file descriptor.

The file descriptor must have at least read permissions.

Sourceval toc_len : t -> int

The number of entries in the table of contents.

Sourceval image_indices : ?size:int -> t -> (int Image.t, string) result Seq.t

Return a lazy sequence of image indices in the table of contents.

If size is specified, filter by the notional size (i.e. the subtype) of the index.

Cursor.Image.t.pixels is the offset from the start of t.data.

Sourceval images : ?size:int -> t -> (Bigstringaf.t Image.t, string) result Seq.t

Return a lazy sequence of images in the cursor.

See image_indices for more information.

OCaml

Innovation. Community. Security.