package gobject-introspection

  1. Overview
  2. Docs

Arg_info — Struct representing an argument

type t

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

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

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.

Just cast OCaml Ctypes base info to arg info.

Just cast OCaml Ctypes arg info to base info

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

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.

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.