sig
type ('a, 'b) pointer = ('a, 'b) Ctypes_static.pointer
type 'a ptr = ('a, [ `C ]) Ctypes.pointer
type 'a ocaml = 'a Ctypes_static.ocaml
type 'a carray = 'a Ctypes_static.carray
type 'a bigarray_class = 'a Ctypes_static.bigarray_class
val genarray :
< ba_repr : 'b; bigarray : ('a, 'b, 'l) Bigarray.Genarray.t;
carray : 'a Ctypes.carray; dims : int array; element : 'a;
layout : 'l >
Ctypes.bigarray_class
val array1 :
< ba_repr : 'b; bigarray : ('a, 'b, 'l) Bigarray.Array1.t;
carray : 'a Ctypes.carray; dims : int; element : 'a; layout : 'l >
Ctypes.bigarray_class
val array2 :
< ba_repr : 'b; bigarray : ('a, 'b, 'l) Bigarray.Array2.t;
carray : 'a Ctypes.carray Ctypes.carray; dims : int * int;
element : 'a; layout : 'l >
Ctypes.bigarray_class
val array3 :
< ba_repr : 'b; bigarray : ('a, 'b, 'l) Bigarray.Array3.t;
carray : 'a Ctypes.carray Ctypes.carray Ctypes.carray;
dims : int * int * int; element : 'a; layout : 'l >
Ctypes.bigarray_class
type ('a, 'kind) structured = ('a, 'kind) Ctypes_static.structured
type 'a structure = ('a, [ `Struct ]) Ctypes.structured
type 'a union = ('a, [ `Union ]) Ctypes.structured
type ('a, 't) field = ('a, 't) Ctypes_static.field
type 'a abstract = 'a Ctypes_static.abstract
type 'a typ = 'a Ctypes_static.typ
val void : unit typ
val char : char typ
val schar : int 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 : int32 typ
val int64_t : int64 typ
module Intptr : Signed.S
val intptr_t : Intptr.t typ
module Ptrdiff : Signed.S
val ptrdiff_t : Ptrdiff.t typ
val camlint : int typ
val uchar : Unsigned.uchar typ
val bool : bool typ
val uint8_t : Unsigned.uint8 typ
val uint16_t : Unsigned.uint16 typ
val uint32_t : Unsigned.uint32 typ
val uint64_t : Unsigned.uint64 typ
val size_t : Unsigned.size_t typ
val ushort : Unsigned.ushort typ
val sint : Signed.sint typ
val uint : Unsigned.uint typ
val ulong : Unsigned.ulong typ
val ullong : Unsigned.ullong typ
module Uintptr : Unsigned.S
val uintptr_t : Uintptr.t typ
val float : float typ
val double : float typ
val ldouble : LDouble.t typ
val complex32 : Complex.t typ
val complex64 : Complex.t typ
val complexld : ComplexL.t typ
val ptr : 'a typ -> 'a Ctypes_static.ptr typ
val ptr_opt : 'a typ -> 'a Ctypes_static.ptr option typ
val string : string typ
val string_opt : string option typ
val ocaml_string : string Ctypes_static.ocaml typ
val ocaml_bytes : Bytes.t Ctypes_static.ocaml typ
val array : int -> 'a typ -> 'a Ctypes_static.carray typ
val bigarray :
< ba_repr : 'b; bigarray : 'bigarray; carray : 'c; dims : 'dims;
element : 'a; layout : Bigarray.c_layout >
Ctypes_static.bigarray_class ->
'dims -> ('a, 'b) Bigarray.kind -> 'bigarray typ
val fortran_bigarray :
< ba_repr : 'b; bigarray : 'bigarray; carray : 'c; dims : 'dims;
element : 'a; layout : Bigarray.fortran_layout >
Ctypes_static.bigarray_class ->
'dims -> ('a, 'b) Bigarray.kind -> 'bigarray typ
val typ_of_bigarray_kind : ('a, 'b) Bigarray.kind -> 'a typ
val structure : string -> 's Ctypes_static.structure typ
val union : string -> 's Ctypes_static.union typ
val field :
('s, [< `Struct | `Union ] as 'b) Ctypes_static.structured typ ->
string -> 'a typ -> ('a, ('s, 'b) Ctypes_static.structured) field
val seal : ('a, [< `Struct | `Union ]) Ctypes_static.structured typ -> unit
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 abstract :
name:string -> size:int -> alignment:int -> 'a Ctypes_static.abstract typ
val lift_typ : 'a Ctypes_static.typ -> 'a typ
type 'a fn = 'a Ctypes_static.fn
val ( @-> ) : 'a typ -> 'b fn -> ('a -> 'b) fn
val returning : 'a typ -> 'a fn
type 'a static_funptr = 'a Ctypes_static.static_funptr
val static_funptr : 'a fn -> 'a Ctypes_static.static_funptr typ
val sizeof : 'a typ -> int
val alignment : 'a typ -> int
val format_typ : ?name:string -> Format.formatter -> 'a typ -> unit
val format_fn : ?name:string -> Format.formatter -> 'a fn -> unit
val string_of_typ : ?name:string -> 'a typ -> string
val string_of_fn : ?name:string -> 'a fn -> string
val format : 'a typ -> Format.formatter -> 'a -> unit
val string_of : 'a typ -> 'a -> string
val null : unit Ctypes.ptr
val ( !@ ) : 'a Ctypes.ptr -> 'a
val ( <-@ ) : 'a Ctypes.ptr -> 'a -> unit
val ( +@ ) : ('a, 'b) Ctypes.pointer -> int -> ('a, 'b) Ctypes.pointer
val ( -@ ) : ('a, 'b) Ctypes.pointer -> int -> ('a, 'b) Ctypes.pointer
val ptr_diff : ('a, 'b) Ctypes.pointer -> ('a, 'b) Ctypes.pointer -> int
val from_voidp : 'a typ -> unit Ctypes.ptr -> 'a Ctypes.ptr
val to_voidp : 'a Ctypes.ptr -> unit Ctypes.ptr
val allocate :
?finalise:('a Ctypes.ptr -> unit) -> 'a typ -> 'a -> 'a Ctypes.ptr
val allocate_n :
?finalise:('a Ctypes.ptr -> unit) -> 'a typ -> count:int -> 'a Ctypes.ptr
val ptr_compare : 'a Ctypes.ptr -> 'a Ctypes.ptr -> int
val is_null : 'a Ctypes.ptr -> bool
val reference_type : 'a Ctypes.ptr -> 'a typ
val ptr_of_raw_address : nativeint -> unit Ctypes.ptr
val funptr_of_raw_address :
nativeint -> (unit -> unit) Ctypes_static.static_funptr
val raw_address_of_ptr : unit Ctypes.ptr -> nativeint
val string_from_ptr : char Ctypes.ptr -> length:int -> string
val ocaml_string_start : string -> string Ctypes.ocaml
val ocaml_bytes_start : Bytes.t -> Bytes.t Ctypes.ocaml
module CArray :
sig
type 'a t = 'a Ctypes.carray
val get : 'a Ctypes.CArray.t -> int -> 'a
val set : 'a Ctypes.CArray.t -> int -> 'a -> unit
val unsafe_get : 'a Ctypes.CArray.t -> int -> 'a
val unsafe_set : 'a Ctypes.CArray.t -> int -> 'a -> unit
val of_list : 'a typ -> 'a list -> 'a Ctypes.CArray.t
val to_list : 'a Ctypes.CArray.t -> 'a list
val iter : ('a -> unit) -> 'a Ctypes.CArray.t -> unit
val map :
'b typ -> ('a -> 'b) -> 'a Ctypes.CArray.t -> 'b Ctypes.CArray.t
val mapi :
'b typ ->
(int -> 'a -> 'b) -> 'a Ctypes.CArray.t -> 'b Ctypes.CArray.t
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b Ctypes.CArray.t -> 'a
val fold_right : ('b -> 'a -> 'a) -> 'b Ctypes.CArray.t -> 'a -> 'a
val length : 'a Ctypes.CArray.t -> int
val start : 'a Ctypes.CArray.t -> 'a Ctypes.ptr
val from_ptr : 'a Ctypes.ptr -> int -> 'a Ctypes.CArray.t
val make :
?finalise:('a Ctypes.CArray.t -> unit) ->
'a typ -> ?initial:'a -> int -> 'a Ctypes.CArray.t
val copy : 'a Ctypes.CArray.t -> 'a Ctypes.CArray.t
val sub :
'a Ctypes.CArray.t -> pos:int -> length:int -> 'a Ctypes.CArray.t
val element_type : 'a Ctypes.CArray.t -> 'a typ
end
val bigarray_start :
< ba_repr : 'c; bigarray : 'b; carray : 'd; dims : 'e; element : 'a;
layout : 'l >
Ctypes.bigarray_class -> 'b -> 'a Ctypes.ptr
val bigarray_of_ptr :
< ba_repr : 'f; bigarray : 'b; carray : 'c; dims : 'i; element : 'a;
layout : Bigarray.c_layout >
Ctypes.bigarray_class ->
'i -> ('a, 'f) Bigarray.kind -> 'a Ctypes.ptr -> 'b
val fortran_bigarray_of_ptr :
< ba_repr : 'f; bigarray : 'b; carray : 'c; dims : 'i; element : 'a;
layout : Bigarray.fortran_layout >
Ctypes.bigarray_class ->
'i -> ('a, 'f) Bigarray.kind -> 'a Ctypes.ptr -> 'b
val array_of_bigarray :
< ba_repr : 'a; bigarray : 'b; carray : 'c; dims : 'd; element : 'e;
layout : Bigarray.c_layout >
Ctypes.bigarray_class -> 'b -> 'c
val bigarray_of_array :
< ba_repr : 'f; bigarray : 'b; carray : 'c Ctypes.carray; dims : 'i;
element : 'a; layout : Bigarray.c_layout >
Ctypes.bigarray_class -> ('a, 'f) Bigarray.kind -> 'c Ctypes.carray -> 'b
val make :
?finalise:(('a, 'b) Ctypes.structured -> unit) ->
('a, 'b) Ctypes.structured typ -> ('a, 'b) Ctypes.structured
val setf :
('b, 'c) Ctypes.structured ->
('a, ('b, 'c) Ctypes.structured) Ctypes.field -> 'a -> unit
val getf :
('b, 'c) Ctypes.structured ->
('a, ('b, 'c) Ctypes.structured) Ctypes.field -> 'a
val ( @. ) :
('b, 'c) Ctypes.structured ->
('a, ('b, 'c) Ctypes.structured) Ctypes.field -> 'a Ctypes.ptr
val ( |-> ) :
('b, 'c) Ctypes.structured Ctypes.ptr ->
('a, ('b, 'c) Ctypes.structured) Ctypes.field -> 'a Ctypes.ptr
val offsetof : ('a, 'b Ctypes.structure) Ctypes.field -> int
val field_type : ('a, 'b) Ctypes.field -> 'a typ
val field_name : ('a, 'b) Ctypes.field -> string
val addr :
('a, 'b) Ctypes.structured -> ('a, 'b) Ctypes.structured Ctypes.ptr
val coerce : 'a typ -> 'b typ -> 'a -> 'b
val coerce_fn : 'a fn -> 'b fn -> 'a -> 'b
module type FOREIGN =
sig
type 'a fn
type 'a return
val ( @-> ) :
'a typ -> 'b Ctypes.FOREIGN.fn -> ('a -> 'b) Ctypes.FOREIGN.fn
val returning : 'a typ -> 'a Ctypes.FOREIGN.return Ctypes.FOREIGN.fn
type 'a result
val foreign :
string ->
('a -> 'b) Ctypes.FOREIGN.fn -> ('a -> 'b) Ctypes.FOREIGN.result
val foreign_value :
string -> 'a typ -> 'a Ctypes.ptr Ctypes.FOREIGN.result
end
module Root :
sig
val create : 'a -> unit Ctypes.ptr
val get : unit Ctypes.ptr -> 'a
val set : unit Ctypes.ptr -> 'a -> unit
val release : unit Ctypes.ptr -> unit
end
exception Unsupported of string
exception ModifyingSealedType of string
exception IncompleteType
type uncoercible_info
exception Uncoercible of Ctypes.uncoercible_info
end