package ctypes

  1. Overview
  2. Docs
type abstract_type = {
  1. aname : string;
  2. asize : int;
  3. aalignment : int;
}
type !_ ocaml_type =
  1. | String : string ocaml_type
  2. | Bytes : Bytes.t ocaml_type
  3. | FloatArray : float array ocaml_type
type incomplete_size = {
  1. mutable isize : int;
}
type structured_spec = {
  1. size : int;
  2. align : int;
}
type !'a structspec =
  1. | Incomplete of incomplete_size
  2. | Complete of structured_spec
type !_ typ =
  1. | Void : unit typ
  2. | Primitive : 'a Ctypes_primitive_types.prim -> 'a typ
  3. | Pointer : 'a0 typ -> 'a0 ptr typ
  4. | Struct : 'a1 structure_type -> 'a1 structure typ
  5. | Union : 'a2 union_type -> 'a2 union typ
  6. | Abstract : abstract_type -> 'a3 abstract typ
  7. | View : ('a4, 'b) view -> 'a4 typ
  8. | Array : 'a5 typ * int -> 'a5 carray typ
  9. | Bigarray : ('c, 'a6) Ctypes_bigarray.t -> 'a6 typ
  10. | OCaml : 'a7 ocaml_type -> 'a7 ocaml typ
and !'a carray = {
  1. astart : 'a ptr;
  2. alength : int;
}
and (!'a, !'kind) structured = {
  1. structured : ('a, 'kind) structured ptr;
}
and !'a union = ('a, [ `Union ]) structured
and !'a structure = ('a, [ `Struct ]) structured
and !'a abstract = ('a, [ `Abstract ]) structured
and (!_, !_) pointer =
  1. | CPointer : 'a typ Ctypes_ptr.Fat.t -> ('a, [ `C ]) pointer
  2. | OCamlRef : int * 'a0 * 'a0 ocaml_type -> ('a0, [ `OCaml ]) pointer
and !'a ptr = ('a, [ `C ]) pointer
and !'a ocaml = ('a, [ `OCaml ]) pointer
and (!'a, !'b) view = {
  1. read : 'b -> 'a;
  2. write : 'a -> 'b;
  3. format_typ : ((Format.formatter -> unit) -> Format.formatter -> unit) option;
  4. format : (Format.formatter -> 'a -> unit) option;
  5. ty : 'b typ;
}
and (!'a, !'s) field = {
  1. ftype : 'a typ;
  2. foffset : int;
  3. fname : string;
}
and !'a structure_type = {
  1. tag : string;
  2. mutable spec : 'a structspec;
  3. mutable fields : 'a structure boxed_field list;
}
and !'a union_type = {
  1. utag : string;
  2. mutable uspec : structured_spec option;
  3. mutable ufields : 'a union boxed_field list;
}
and !'s0 boxed_field =
  1. | BoxedField : ('a, 's) field -> 's boxed_field
type !_ bigarray_class =
  1. | Genarray : < ba_repr : 'b ; bigarray : ('a, 'b, Bigarray.c_layout) Bigarray.Genarray.t ; carray : 'a carray ; dims : int array ; element : 'a > bigarray_class
  2. | Array1 : < ba_repr : 'b0 ; bigarray : ('a0, 'b0, Bigarray.c_layout) Bigarray.Array1.t ; carray : 'a0 carray ; dims : int ; element : 'a0 > bigarray_class
  3. | Array2 : < ba_repr : 'b1 ; bigarray : ('a1, 'b1, Bigarray.c_layout) Bigarray.Array2.t ; carray : 'a1 carray carray ; dims : int * int ; element : 'a1 > bigarray_class
  4. | Array3 : < ba_repr : 'b2 ; bigarray : ('a2, 'b2, Bigarray.c_layout) Bigarray.Array3.t ; carray : 'a2 carray carray carray ; dims : int * int * int ; element : 'a2 > bigarray_class
type !_ fn =
  1. | Returns : 'a typ -> 'a fn
  2. | Function : 'a0 typ * 'b fn -> ('a0 -> 'b) fn
type boxed_typ =
  1. | BoxedType : 'a typ -> boxed_typ
val sizeof : 'a typ -> int
val alignment : 'a typ -> int
val passable : 'a typ -> bool
val void : unit typ
val char : char typ
val schar : int typ
val float : float typ
val double : float typ
val complex32 : Complex.t typ
val complex64 : Complex.t typ
val short : int typ
val int : int typ
val long : Signed.long typ
val llong : Signed.llong typ
val nativeint : nativeint typ
val int8_t : int typ
val int16_t : int typ
val int32_t : Signed.Int32.t typ
val int64_t : Signed.Int64.t typ
val camlint : int typ
val uchar : Unsigned.uchar typ
val bool : bool typ
val uint8_t : Unsigned.UInt8.t typ
val uint16_t : Unsigned.UInt16.t typ
val uint32_t : Unsigned.UInt32.t typ
val uint64_t : Unsigned.UInt64.t typ
val size_t : Unsigned.size_t typ
val ushort : Unsigned.ushort typ
val uint : Unsigned.uint typ
val ulong : Unsigned.ulong typ
val ullong : Unsigned.ullong typ
val array : int -> 'a typ -> 'a carray typ
val ocaml_string : string ocaml typ
val ocaml_bytes : Bytes.t ocaml typ
val ocaml_float_array : float array ocaml typ
val ptr : 'a typ -> 'a ptr typ
val (@->) : 'a typ -> 'b fn -> ('a -> 'b) fn
val abstract : name:string -> size:int -> alignment:int -> 'a abstract typ
val view : ?format_typ:((Format.formatter -> unit) -> Format.formatter -> unit) -> ?format:(Format.formatter -> 'b -> unit) -> read:('a -> 'b) -> write:('b -> 'a) -> 'a typ -> 'b typ
val typedef : 'a typ -> string -> 'a typ
val bigarray : < ba_repr : 'c ; bigarray : 'd ; carray : 'e ; dims : 'b ; element : 'a > bigarray_class -> 'b -> ('a, 'c) Bigarray.kind -> 'd typ
val returning : 'a typ -> 'a fn
val structure : string -> 'a structure typ
val union : string -> 'a union typ
val offsetof : ('a, 'b) field -> int
val field_type : ('a, 'b) field -> 'a typ
val field_name : ('a, 'b) field -> string
exception IncompleteType
exception ModifyingSealedType of string
exception Unsupported of string
val unsupported : ('a, unit, string, 'b) Pervasives.format4 -> 'a
type arithmetic =
  1. | Int8
  2. | Int16
  3. | Int32
  4. | Int64
  5. | Uint8
  6. | Uint16
  7. | Uint32
  8. | Uint64
  9. | Float
  10. | Double
OCaml

Innovation. Community. Security.