Module GObject_introspection.Arg_info

type t

Arg_info represents an argument. An argument is always part of a Callable_info.

val arginfo : t Ctypes.structure Ctypes.typ
val get_direction : t Ctypes.structure Ctypes.ptr -> Bindings.Arg_info.direction

Obtain the direction of the argument. Check GIDirection for possible direction values.

val get_closure : t Ctypes.structure Ctypes.ptr -> int

Obtain the index of the user data argument. This is only valid for arguments which are callbacks. Returns index of the user data argument or -1 if there is none.

val get_destroy : t Ctypes.structure Ctypes.ptr -> int

Obtains the index of the GDestroyNotify argument. This is only valid for arguments which are callbacks. Returns index of the GDestroyNotify argument or -1 if there is none

val get_ownership_transfer : t Ctypes.structure Ctypes.ptr -> Bindings.Arg_info.transfer

Obtain the ownership transfer for this argument. GITransfer contains a list of possible values.

val may_be_null : t Ctypes.structure Ctypes.ptr -> bool

Obtain if the type of the argument includes the possibility of NULL. For 'in' values this means that NULL is a valid value. For 'out' values, this means that NULL may be returned. See also Arg_info.is_optional.

val is_caller_allocates : t Ctypes.structure Ctypes.ptr -> bool

Obtain if the argument is a pointer to a struct or object that will receive an output of a function. The default assumption for Arg_info.Out arguments which have allocation is that the callee allocates; if this is TRUE, then the caller must allocate.

val is_optional : t Ctypes.structure Ctypes.ptr -> bool

Obtain if the argument is optional. For 'out' arguments this means that you can pass NULL in order to ignore the result.

val is_return_value : t Ctypes.structure Ctypes.ptr -> bool

Obtain if the argument is a return value. It can either be a parameter or a return value.

val is_skip : t Ctypes.structure Ctypes.ptr -> bool

Obtain if an argument is only useful in C.

val get_scope : t Ctypes.structure Ctypes.ptr -> Bindings.Arg_info.scope_type
val get_type : t Ctypes.structure Ctypes.ptr -> Type_info.t Ctypes.structure Ctypes.ptr
val cast_from_baseinfo : Base_info.t Ctypes.structure Ctypes.ptr -> t Ctypes.structure Ctypes.ptr

Just cast OCaml Ctypes base info to arg info.

val cast_to_baseinfo : t Ctypes.structure Ctypes.ptr -> Base_info.t Ctypes.structure Ctypes.ptr

Just cast OCaml Ctypes arg info to base info

val add_unref_finaliser : t Ctypes.structure Ctypes.ptr -> t Ctypes.structure Ctypes.ptr

Add unref of the C underlying structure whith Gc.finalise.

val from_baseinfo : Base_info.t Ctypes.structure Ctypes.ptr -> t Ctypes.structure Ctypes.ptr

Return a Arg_info.t from a Base_info.t, the underlying C structure ref count is increased and the value is Gc.finalis"ed" with Base_info.baseinfo_unref.

val to_baseinfo : t Ctypes.structure Ctypes.ptr -> Base_info.t Ctypes.structure Ctypes.ptr

Return a Base_info.t form a Arg_info, the underlying C structure ref count is increased and the value is Gc.finalis"ed" with Base_info.baseinfo_unref.